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