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