[NUI] Clean NUI codes from Adaptor.cs to Window.cs (#652)
[platform/core/csapi/tizenfx.git] / src / Tizen.NUI / src / public / Vector4.cs
1 /*
2  * Copyright(c) 2018 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 using System;
18 using Tizen.NUI.Binding;
19
20 namespace Tizen.NUI
21 {
22
23     /// <summary>
24     /// A four-dimensional vector.
25     /// </summary>
26     /// <since_tizen> 3 </since_tizen>
27     [TypeConverter(typeof(Vector4TypeConverter))]
28     public class Vector4 : global::System.IDisposable
29     {
30         /// <summary>
31         /// swigCMemOwn.
32         /// </summary>
33         /// <since_tizen> 3 </since_tizen>
34         protected bool swigCMemOwn;
35
36         /// <summary>
37         /// A Flat to check if it is already disposed.
38         /// </summary>
39         /// <since_tizen> 3 </since_tizen>
40         protected bool disposed = false;
41
42         private global::System.Runtime.InteropServices.HandleRef swigCPtr;
43         //A Flag to check who called Dispose(). (By User or DisposeQueue)
44         private bool isDisposeQueued = false;
45
46         /// <summary>
47         /// The default constructor initializes the vector to 0.
48         /// </summary>
49         /// <since_tizen> 3 </since_tizen>
50         public Vector4() : this(NDalicPINVOKE.new_Vector4__SWIG_0(), true)
51         {
52             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
53         }
54
55         /// <summary>
56         /// The conversion constructor from four floats.
57         /// </summary>
58         /// <param name="x">The x (or r/s) component.</param>
59         /// <param name="y">The y (or g/t) component.</param>
60         /// <param name="z">The z (or b/p) component.</param>
61         /// <param name="w">The w (or a/q) component.</param>
62         /// <since_tizen> 3 </since_tizen>
63         public Vector4(float x, float y, float z, float w) : this(NDalicPINVOKE.new_Vector4__SWIG_1(x, y, z, w), true)
64         {
65             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
66         }
67
68         /// <summary>
69         /// The conversion constructor from an array of four floats.
70         /// </summary>
71         /// <param name="array">The array of either xyzw/rgba/stpq.</param>
72         /// <since_tizen> 3 </since_tizen>
73         public Vector4(float[] array) : this(NDalicPINVOKE.new_Vector4__SWIG_2(array), true)
74         {
75             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
76         }
77
78         /// <summary>
79         /// The conversion constructor from Vector2.
80         /// </summary>
81         /// <param name="vec2">Vector2 to copy from, z and w are initialized to 0.</param>
82         /// <since_tizen> 3 </since_tizen>
83         public Vector4(Vector2 vec2) : this(NDalicPINVOKE.new_Vector4__SWIG_3(Vector2.getCPtr(vec2)), true)
84         {
85             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
86         }
87
88         /// <summary>
89         /// The conversion constructor from Vector3.
90         /// </summary>
91         /// <param name="vec3">Vector3 to copy from, w is initialized to 0.</param>
92         /// <since_tizen> 3 </since_tizen>
93         public Vector4(Vector3 vec3) : this(NDalicPINVOKE.new_Vector4__SWIG_4(Vector3.getCPtr(vec3)), true)
94         {
95             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
96         }
97
98         internal Vector4(global::System.IntPtr cPtr, bool cMemoryOwn)
99         {
100             swigCMemOwn = cMemoryOwn;
101             swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
102         }
103
104         /// <summary>
105         /// Destructor.
106         /// </summary>
107         /// <since_tizen> 3 </since_tizen>
108         ~Vector4()
109         {
110             if(!isDisposeQueued)
111             {
112                 isDisposeQueued = true;
113                 DisposeQueue.Instance.Add(this);
114             }
115         }
116
117         /// <summary>
118         /// (1.0f,1.0f,1.0f,1.0f).
119         /// </summary>
120         /// <since_tizen> 3 </since_tizen>
121         public static Vector4 One
122         {
123             get
124             {
125                 global::System.IntPtr cPtr = NDalicPINVOKE.Vector4_ONE_get();
126                 Vector4 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector4(cPtr, false);
127                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
128                 return ret;
129             }
130         }
131
132         /// <summary>
133         /// (1.0f,0.0f,0.0f,0.0f).
134         /// </summary>
135         /// <since_tizen> 3 </since_tizen>
136         public static Vector4 XAxis
137         {
138             get
139             {
140                 global::System.IntPtr cPtr = NDalicPINVOKE.Vector4_XAXIS_get();
141                 Vector4 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector4(cPtr, false);
142                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
143                 return ret;
144             }
145         }
146
147         /// <summary>
148         /// (0.0f,1.0f,0.0f,0.0f).
149         /// </summary>
150         /// <since_tizen> 3 </since_tizen>
151         public static Vector4 YAxis
152         {
153             get
154             {
155                 global::System.IntPtr cPtr = NDalicPINVOKE.Vector4_YAXIS_get();
156                 Vector4 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector4(cPtr, false);
157                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
158                 return ret;
159             }
160         }
161
162         /// <summary>
163         /// (0.0f,0.0f,1.0f,0.0f).
164         /// </summary>
165         /// <since_tizen> 3 </since_tizen>
166         public static Vector4 ZAxis
167         {
168             get
169             {
170                 global::System.IntPtr cPtr = NDalicPINVOKE.Vector4_ZAXIS_get();
171                 Vector4 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector4(cPtr, false);
172                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
173                 return ret;
174             }
175         }
176
177         /// <summary>
178         /// (0.0f, 0.0f, 0.0f, 0.0f).
179         /// </summary>
180         /// <since_tizen> 3 </since_tizen>
181         public static Vector4 Zero
182         {
183             get
184             {
185                 global::System.IntPtr cPtr = NDalicPINVOKE.Vector4_ZERO_get();
186                 Vector4 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector4(cPtr, false);
187                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
188                 return ret;
189             }
190         }
191
192         /// <summary>
193         /// The x component.
194         /// </summary>
195         /// <since_tizen> 3 </since_tizen>
196         public float X
197         {
198             set
199             {
200                 NDalicPINVOKE.Vector4_X_set(swigCPtr, value);
201                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
202             }
203             get
204             {
205                 float ret = NDalicPINVOKE.Vector4_X_get(swigCPtr);
206                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
207                 return ret;
208             }
209         }
210
211         /// <summary>
212         /// The red component.
213         /// </summary>
214         /// <since_tizen> 3 </since_tizen>
215         public float R
216         {
217             set
218             {
219                 NDalicPINVOKE.Vector4_r_set(swigCPtr, value);
220                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
221             }
222             get
223             {
224                 float ret = NDalicPINVOKE.Vector4_r_get(swigCPtr);
225                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
226                 return ret;
227             }
228         }
229
230         /// <summary>
231         /// The s component.
232         /// </summary>
233         /// <since_tizen> 3 </since_tizen>
234         public float S
235         {
236             set
237             {
238                 NDalicPINVOKE.Vector4_s_set(swigCPtr, value);
239                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
240             }
241             get
242             {
243                 float ret = NDalicPINVOKE.Vector4_s_get(swigCPtr);
244                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
245                 return ret;
246             }
247         }
248
249         /// <summary>
250         /// The y component.
251         /// </summary>
252         /// <since_tizen> 3 </since_tizen>
253         public float Y
254         {
255             set
256             {
257                 NDalicPINVOKE.Vector4_Y_set(swigCPtr, value);
258                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
259             }
260             get
261             {
262                 float ret = NDalicPINVOKE.Vector4_Y_get(swigCPtr);
263                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
264                 return ret;
265             }
266         }
267
268         /// <summary>
269         /// The green component.
270         /// </summary>
271         /// <since_tizen> 3 </since_tizen>
272         public float G
273         {
274             set
275             {
276                 NDalicPINVOKE.Vector4_g_set(swigCPtr, value);
277                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
278             }
279             get
280             {
281                 float ret = NDalicPINVOKE.Vector4_g_get(swigCPtr);
282                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
283                 return ret;
284             }
285         }
286
287         /// <summary>
288         /// The t component.
289         /// </summary>
290         /// <since_tizen> 3 </since_tizen>
291         public float T
292         {
293             set
294             {
295                 NDalicPINVOKE.Vector4_t_set(swigCPtr, value);
296                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
297             }
298             get
299             {
300                 float ret = NDalicPINVOKE.Vector4_t_get(swigCPtr);
301                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
302                 return ret;
303             }
304         }
305
306         /// <summary>
307         /// The z component.
308         /// </summary>
309         /// <since_tizen> 3 </since_tizen>
310         public float Z
311         {
312             set
313             {
314                 NDalicPINVOKE.Vector4_Z_set(swigCPtr, value);
315                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
316             }
317             get
318             {
319                 float ret = NDalicPINVOKE.Vector4_Z_get(swigCPtr);
320                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
321                 return ret;
322             }
323         }
324
325         /// <summary>
326         /// The blue component.
327         /// </summary>
328         /// <since_tizen> 3 </since_tizen>
329         public float B
330         {
331             set
332             {
333                 NDalicPINVOKE.Vector4_b_set(swigCPtr, value);
334                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
335             }
336             get
337             {
338                 float ret = NDalicPINVOKE.Vector4_b_get(swigCPtr);
339                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
340                 return ret;
341             }
342         }
343
344         /// <summary>
345         /// The p component.
346         /// </summary>
347         /// <since_tizen> 3 </since_tizen>
348         public float P
349         {
350             set
351             {
352                 NDalicPINVOKE.Vector4_p_set(swigCPtr, value);
353                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
354             }
355             get
356             {
357                 float ret = NDalicPINVOKE.Vector4_p_get(swigCPtr);
358                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
359                 return ret;
360             }
361         }
362
363         /// <summary>
364         /// The w component.
365         /// </summary>
366         /// <since_tizen> 3 </since_tizen>
367         public float W
368         {
369             set
370             {
371                 NDalicPINVOKE.Vector4_W_set(swigCPtr, value);
372                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
373             }
374             get
375             {
376                 float ret = NDalicPINVOKE.Vector4_W_get(swigCPtr);
377                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
378                 return ret;
379             }
380         }
381
382         /// <summary>
383         /// The alpha component.
384         /// </summary>
385         /// <since_tizen> 3 </since_tizen>
386         public float A
387         {
388             set
389             {
390                 NDalicPINVOKE.Vector4_a_set(swigCPtr, value);
391                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
392             }
393             get
394             {
395                 float ret = NDalicPINVOKE.Vector4_a_get(swigCPtr);
396                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
397                 return ret;
398             }
399         }
400
401         /// <summary>
402         /// The q component.
403         /// </summary>
404         /// <since_tizen> 3 </since_tizen>
405         public float Q
406         {
407             set
408             {
409                 NDalicPINVOKE.Vector4_q_set(swigCPtr, value);
410                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
411             }
412             get
413             {
414                 float ret = NDalicPINVOKE.Vector4_q_get(swigCPtr);
415                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
416                 return ret;
417             }
418         }
419
420         /// <summary>
421         /// The array subscript operator overload.
422         /// </summary>
423         /// <param name="index">The subscript index.</param>
424         /// <returns>The float at the given index.</returns>
425         /// <since_tizen> 3 </since_tizen>
426         public float this[uint index]
427         {
428             get
429             {
430                 return ValueOfIndex(index);
431             }
432         }
433
434
435         /// <summary>
436         /// The addition operator.
437         /// </summary>
438         /// <param name="arg1">The first value.</param>
439         /// <param name="arg2">The second value.</param>
440         /// <returns>The vector containing the result of the addition.</returns>
441         /// <since_tizen> 3 </since_tizen>
442         public static Vector4 operator +(Vector4 arg1, Vector4 arg2)
443         {
444             return arg1.Add(arg2);
445         }
446
447         /// <summary>
448         /// The subtraction operator.
449         /// </summary>
450         /// <param name="arg1">The first value.</param>
451         /// <param name="arg2">The second value.</param>
452         /// <returns>The vector containing the result of the subtraction.</returns>
453         /// <since_tizen> 3 </since_tizen>
454         public static Vector4 operator -(Vector4 arg1, Vector4 arg2)
455         {
456             return arg1.Subtract(arg2);
457         }
458
459         /// <summary>
460         /// The unary negation operator.
461         /// </summary>
462         /// <param name="arg1">The target value.</param>
463         /// <returns>The vector containing the negation.</returns>
464         /// <since_tizen> 3 </since_tizen>
465         public static Vector4 operator -(Vector4 arg1)
466         {
467             return arg1.Subtract();
468         }
469
470         /// <summary>
471         /// The multiplication operator.
472         /// </summary>
473         /// <param name="arg1">The first value.</param>
474         /// <param name="arg2">The second value.</param>
475         /// <returns>The vector containing the result of the multiplication.</returns>
476         /// <since_tizen> 3 </since_tizen>
477         public static Vector4 operator *(Vector4 arg1, Vector4 arg2)
478         {
479             return arg1.Multiply(arg2);
480         }
481
482         /// <summary>
483         /// The multiplication operator.
484         /// </summary>
485         /// <param name="arg1">The first value.</param>
486         /// <param name="arg2">The float value to scale the vector.</param>
487         /// <returns>The vector containing the result of scaling.</returns>
488         /// <since_tizen> 3 </since_tizen>
489         public static Vector4 operator *(Vector4 arg1, float arg2)
490         {
491             return arg1.Multiply(arg2);
492         }
493
494         /// <summary>
495         /// The division operator.
496         /// </summary>
497         /// <param name="arg1">The first value.</param>
498         /// <param name="arg2">The second value.</param>
499         /// <returns>The vector containing the result of the division.</returns>
500         /// <since_tizen> 3 </since_tizen>
501         public static Vector4 operator /(Vector4 arg1, Vector4 arg2)
502         {
503             return arg1.Divide(arg2);
504         }
505
506         /// <summary>
507         /// The division operator.
508         /// </summary>
509         /// <param name="arg1">The first value.</param>
510         /// <param name="arg2">The float value to scale the vector by.</param>
511         /// <returns>The vector containing the result of scaling.</returns>
512         /// <since_tizen> 3 </since_tizen>
513         public static Vector4 operator /(Vector4 arg1, float arg2)
514         {
515             return arg1.Divide(arg2);
516         }
517
518         /// <summary>
519         /// Determines whether the specified object is equal to the current object.
520         /// </summary>
521         /// <param name="obj">The object to compare with the current object.</param>
522         /// <returns>true if the specified object is equal to the current object; otherwise, false.</returns>
523         public override bool Equals(System.Object obj)
524         {
525             Vector4 vector4 = obj as Vector4;
526             bool equal = false;
527             if (X == vector4?.X && Y == vector4?.Y && Z == vector4?.Z && W == vector4?.W)
528             {
529                 equal = true;
530             }
531             return equal;
532         }
533
534         /// <summary>
535         /// Gets the the hash code of this Vector4.
536         /// </summary>
537         /// <returns>The Hash Code.</returns>
538         /// <since_tizen> 5 </since_tizen>
539         public override int GetHashCode()
540         {
541             return X.GetHashCode();
542         }
543
544         /// <summary>
545         /// Returns the length of the vector.
546         /// </summary>
547         /// <returns>The length.</returns>
548         /// <since_tizen> 3 </since_tizen>
549         public float Length()
550         {
551             float ret = NDalicPINVOKE.Vector4_Length(swigCPtr);
552             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
553             return ret;
554         }
555
556         /// <summary>
557         /// Returns the length of the vector squared.<br />
558         /// This is faster than using Length() when performing
559         /// threshold checks as it avoids use of the square root.<br />
560         /// </summary>
561         /// <returns>The length of the vector squared.</returns>
562         /// <since_tizen> 3 </since_tizen>
563         public float LengthSquared()
564         {
565             float ret = NDalicPINVOKE.Vector4_LengthSquared(swigCPtr);
566             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
567             return ret;
568         }
569
570         /// <summary>
571         /// Normalizes the vector.<br />
572         /// Sets the vector to unit length whilst maintaining its direction.<br />
573         /// </summary>
574         /// <since_tizen> 3 </since_tizen>
575         public void Normalize()
576         {
577             NDalicPINVOKE.Vector4_Normalize(swigCPtr);
578             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
579         }
580
581         /// <summary>
582         /// Clamps the vector between minimum and maximum vectors.
583         /// </summary>
584         /// <param name="min">The minimum vector.</param>
585         /// <param name="max">The maximum vector.</param>
586         /// <since_tizen> 3 </since_tizen>
587         public void Clamp(Vector4 min, Vector4 max)
588         {
589             NDalicPINVOKE.Vector4_Clamp(swigCPtr, Vector4.getCPtr(min), Vector4.getCPtr(max));
590             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
591         }
592
593         /// <summary>
594         /// Dispose.
595         /// </summary>
596         /// <since_tizen> 3 </since_tizen>
597         public void Dispose()
598         {
599             //Throw excpetion if Dispose() is called in separate thread.
600             if (!Window.IsInstalled())
601             {
602                 throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread.");
603             }
604
605             if (isDisposeQueued)
606             {
607                 Dispose(DisposeTypes.Implicit);
608             }
609             else
610             {
611                 Dispose(DisposeTypes.Explicit);
612                 System.GC.SuppressFinalize(this);
613             }
614         }
615
616         internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Vector4 obj)
617         {
618             return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
619         }
620
621         internal static Vector4 GetVector4FromPtr(global::System.IntPtr cPtr)
622         {
623             Vector4 ret = new Vector4(cPtr, false);
624             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
625             return ret;
626         }
627
628         internal SWIGTYPE_p_float AsFloat()
629         {
630             global::System.IntPtr cPtr = NDalicPINVOKE.Vector4_AsFloat__SWIG_0(swigCPtr);
631             SWIGTYPE_p_float ret = (cPtr == global::System.IntPtr.Zero) ? null : new SWIGTYPE_p_float(cPtr, false);
632             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
633             return ret;
634         }
635
636         internal float Dot(Vector3 other)
637         {
638             float ret = NDalicPINVOKE.Vector4_Dot__SWIG_0(swigCPtr, Vector3.getCPtr(other));
639             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
640             return ret;
641         }
642
643         internal float Dot(Vector4 other)
644         {
645             float ret = NDalicPINVOKE.Vector4_Dot__SWIG_1(swigCPtr, Vector4.getCPtr(other));
646             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
647             return ret;
648         }
649
650         internal float Dot4(Vector4 other)
651         {
652             float ret = NDalicPINVOKE.Vector4_Dot4(swigCPtr, Vector4.getCPtr(other));
653             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
654             return ret;
655         }
656
657         internal Vector4 Cross(Vector4 other)
658         {
659             Vector4 ret = new Vector4(NDalicPINVOKE.Vector4_Cross(swigCPtr, Vector4.getCPtr(other)), true);
660             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
661             return ret;
662         }
663
664         /// <summary>
665         /// Dispose.
666         /// </summary>
667         /// <param name="type">The dispose type</param>
668         /// <since_tizen> 3 </since_tizen>
669         protected virtual void Dispose(DisposeTypes type)
670         {
671             if (disposed)
672             {
673                 return;
674             }
675
676             if (type == DisposeTypes.Explicit)
677             {
678                 //Called by User
679                 //Release your own managed resources here.
680                 //You should release all of your own disposable objects here.
681             }
682
683             //Release your own unmanaged resources here.
684             //You should not access any managed member here except static instance.
685             //because the execution order of Finalizes is non-deterministic.
686
687             if (swigCPtr.Handle != global::System.IntPtr.Zero)
688             {
689                 if (swigCMemOwn)
690                 {
691                     swigCMemOwn = false;
692                     NDalicPINVOKE.delete_Vector4(swigCPtr);
693                 }
694                 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
695             }
696             disposed = true;
697         }
698
699         private Vector4 Add(Vector4 rhs)
700         {
701             Vector4 ret = new Vector4(NDalicPINVOKE.Vector4_Add(swigCPtr, Vector4.getCPtr(rhs)), true);
702             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
703             return ret;
704         }
705
706         private Vector4 AddAssign(Vector4 rhs)
707         {
708             Vector4 ret = new Vector4(NDalicPINVOKE.Vector4_AddAssign(swigCPtr, Vector4.getCPtr(rhs)), false);
709             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
710             return ret;
711         }
712
713         private Vector4 Subtract(Vector4 rhs)
714         {
715             Vector4 ret = new Vector4(NDalicPINVOKE.Vector4_Subtract__SWIG_0(swigCPtr, Vector4.getCPtr(rhs)), true);
716             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
717             return ret;
718         }
719
720         private Vector4 SubtractAssign(Vector4 rhs)
721         {
722             Vector4 ret = new Vector4(NDalicPINVOKE.Vector4_SubtractAssign(swigCPtr, Vector4.getCPtr(rhs)), false);
723             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
724             return ret;
725         }
726
727         private Vector4 Multiply(Vector4 rhs)
728         {
729             Vector4 ret = new Vector4(NDalicPINVOKE.Vector4_Multiply__SWIG_0(swigCPtr, Vector4.getCPtr(rhs)), true);
730             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
731             return ret;
732         }
733
734         private Vector4 Multiply(float rhs)
735         {
736             Vector4 ret = new Vector4(NDalicPINVOKE.Vector4_Multiply__SWIG_1(swigCPtr, rhs), true);
737             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
738             return ret;
739         }
740
741         private Vector4 MultiplyAssign(Vector4 rhs)
742         {
743             Vector4 ret = new Vector4(NDalicPINVOKE.Vector4_MultiplyAssign__SWIG_0(swigCPtr, Vector4.getCPtr(rhs)), false);
744             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
745             return ret;
746         }
747
748         private Vector4 MultiplyAssign(float rhs)
749         {
750             Vector4 ret = new Vector4(NDalicPINVOKE.Vector4_MultiplyAssign__SWIG_1(swigCPtr, rhs), false);
751             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
752             return ret;
753         }
754
755         private Vector4 Divide(Vector4 rhs)
756         {
757             Vector4 ret = new Vector4(NDalicPINVOKE.Vector4_Divide__SWIG_0(swigCPtr, Vector4.getCPtr(rhs)), true);
758             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
759             return ret;
760         }
761
762         private Vector4 Divide(float rhs)
763         {
764             Vector4 ret = new Vector4(NDalicPINVOKE.Vector4_Divide__SWIG_1(swigCPtr, rhs), true);
765             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
766             return ret;
767         }
768
769         private Vector4 DivideAssign(Vector4 rhs)
770         {
771             Vector4 ret = new Vector4(NDalicPINVOKE.Vector4_DivideAssign__SWIG_0(swigCPtr, Vector4.getCPtr(rhs)), false);
772             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
773             return ret;
774         }
775
776         private Vector4 DivideAssign(float rhs)
777         {
778             Vector4 ret = new Vector4(NDalicPINVOKE.Vector4_DivideAssign__SWIG_1(swigCPtr, rhs), false);
779             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
780             return ret;
781         }
782
783         private Vector4 Subtract()
784         {
785             Vector4 ret = new Vector4(NDalicPINVOKE.Vector4_Subtract__SWIG_1(swigCPtr), true);
786             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
787             return ret;
788         }
789
790         private bool EqualTo(Vector4 rhs)
791         {
792             bool ret = NDalicPINVOKE.Vector4_EqualTo(swigCPtr, Vector4.getCPtr(rhs));
793             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
794             return ret;
795         }
796
797         private bool NotEqualTo(Vector4 rhs)
798         {
799             bool ret = NDalicPINVOKE.Vector4_NotEqualTo(swigCPtr, Vector4.getCPtr(rhs));
800             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
801             return ret;
802         }
803
804         private float ValueOfIndex(uint index)
805         {
806             float ret = NDalicPINVOKE.Vector4_ValueOfIndex__SWIG_0(swigCPtr, index);
807             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
808             return ret;
809         }
810
811     }
812
813 }