[NUI] Fix build warning[CA1064]
[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;
18 using System.ComponentModel;
19 using Tizen.NUI.Binding;
20
21 namespace Tizen.NUI
22 {
23
24     /// <summary>
25     /// A four-dimensional vector.
26     /// </summary>
27     /// <since_tizen> 3 </since_tizen>
28     [Binding.TypeConverter(typeof(Vector4TypeConverter))]
29     public class Vector4 : Disposable, ICloneable
30     {
31
32         /// <summary>
33         /// The default constructor initializes the vector to 0.
34         /// </summary>
35         /// <since_tizen> 3 </since_tizen>
36         public Vector4() : this(Interop.Vector4.NewVector4(), true)
37         {
38             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
39         }
40
41         /// <summary>
42         /// The conversion constructor from four floats.
43         /// </summary>
44         /// <param name="x">The x (or r/s) component.</param>
45         /// <param name="y">The y (or g/t) component.</param>
46         /// <param name="z">The z (or b/p) component.</param>
47         /// <param name="w">The w (or a/q) component.</param>
48         /// <since_tizen> 3 </since_tizen>
49         public Vector4(float x, float y, float z, float w) : this(Interop.Vector4.NewVector4(x, y, z, w), true)
50         {
51             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
52         }
53
54         /// <summary>
55         /// The conversion constructor from an array of four floats.
56         /// </summary>
57         /// <param name="array">The array of either xyzw/rgba/stpq.</param>
58         /// <since_tizen> 3 </since_tizen>
59         public Vector4(float[] array) : this(Interop.Vector4.NewVector4(array), true)
60         {
61             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
62         }
63
64         /// <summary>
65         /// The conversion constructor from Vector2.
66         /// </summary>
67         /// <param name="vec2">Vector2 to copy from, z and w are initialized to 0.</param>
68         /// <since_tizen> 3 </since_tizen>
69         public Vector4(Vector2 vec2) : this(Interop.Vector4.NewVector4WithVector2(Vector2.getCPtr(vec2)), true)
70         {
71             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
72         }
73
74         /// <summary>
75         /// The conversion constructor from Vector3.
76         /// </summary>
77         /// <param name="vec3">Vector3 to copy from, w is initialized to 0.</param>
78         /// <since_tizen> 3 </since_tizen>
79         public Vector4(Vector3 vec3) : this(Interop.Vector4.NewVector4WithVector3(Vector3.getCPtr(vec3)), true)
80         {
81             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
82         }
83
84         internal Vector4(global::System.IntPtr cPtr, bool cMemoryOwn) : base(cPtr, cMemoryOwn)
85         {
86         }
87
88         internal Vector4(Vector4ChangedCallback cb, float x, float y, float z, float w) : this(Interop.Vector4.NewVector4(x, y, z, w), true)
89         {
90             callback = cb;
91             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
92         }
93         internal delegate void Vector4ChangedCallback(float x, float y, float z, float w);
94         private Vector4ChangedCallback callback = null;
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.OneGet();
105                 Vector4 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector4(cPtr, false);
106                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw new InvalidOperationException("FATAL: get Exception", 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.XaxisGet();
120                 Vector4 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector4(cPtr, false);
121                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw new InvalidOperationException("FATAL: get Exception", 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.YaxisGet();
135                 Vector4 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector4(cPtr, false);
136                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw new InvalidOperationException("FATAL: get Exception", 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.ZaxisGet();
150                 Vector4 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector4(cPtr, false);
151                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw new InvalidOperationException("FATAL: get Exception", 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.ZeroGet();
165                 Vector4 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector4(cPtr, false);
166                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw new InvalidOperationException("FATAL: get Exception", NDalicPINVOKE.SWIGPendingException.Retrieve());
167                 return ret;
168             }
169         }
170
171         /// <summary>
172         /// The x component.
173         /// </summary>
174         /// <remarks>
175         /// The setter is deprecated in API8 and will be removed in API10. Please use new Vector4(...) constructor.
176         /// </remarks>
177         /// <code>
178         /// // DO NOT use like the followings!
179         /// Vector4 vector4 = new Vector4();
180         /// vector4.X = 0.1f; 
181         /// // Please USE like this
182         /// float x = 0.1f, y = 0.5f, z = 0.9f, w = 1.0f;
183         /// Vector4 vector4 = new Vector4(x, y, z, w);
184         /// </code>
185         /// <since_tizen> 3 </since_tizen>
186         public float X
187         {
188             set
189             {
190                 Tizen.Log.Fatal("NUI", "Please do not use this setter, Deprecated in API8, will be removed in API10. please use new Vector4(...) constructor");
191
192                 Interop.Vector4.XSet(swigCPtr, value);
193                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
194
195                 callback?.Invoke(X, Y, Z, W);
196             }
197             get
198             {
199                 float ret = Interop.Vector4.XGet(swigCPtr);
200                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw new InvalidOperationException("FATAL: get Exception", NDalicPINVOKE.SWIGPendingException.Retrieve());
201                 return ret;
202             }
203         }
204
205         /// <summary>
206         /// The red component.
207         /// </summary>
208         /// <remarks>
209         /// The setter is deprecated in API8 and will be removed in API10. Please use new Vector4(...) constructor.
210         /// </remarks>
211         /// <code>
212         /// // DO NOT use like the followings!
213         /// Vector4 vector4 = new Vector4();
214         /// vector4.R = 0.1f; 
215         /// // Please USE like this
216         /// float r = 0.1f, g = 0.5f, b = 0.9f, a = 1.0f;
217         /// Vector4 vector4 = new Vector4(r, g, b, a);
218         /// </code>
219         /// <since_tizen> 3 </since_tizen>
220         public float R
221         {
222             set
223             {
224                 Tizen.Log.Fatal("NUI", "Please do not use this setter, Deprecated in API8, will be removed in API10. please use new Vector4(...) constructor");
225
226                 Interop.Vector4.RSet(swigCPtr, value);
227                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
228
229                 callback?.Invoke(X, Y, Z, W);
230             }
231             get
232             {
233                 float ret = Interop.Vector4.RGet(swigCPtr);
234                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw new InvalidOperationException("FATAL: get Exception", NDalicPINVOKE.SWIGPendingException.Retrieve());
235                 return ret;
236             }
237         }
238
239         /// <summary>
240         /// The s component.
241         /// </summary>
242         /// <remarks>
243         /// The setter is deprecated in API8 and will be removed in API10. Please use new Vector4(...) constructor.
244         /// </remarks>
245         /// <code>
246         /// // DO NOT use like the followings!
247         /// Vector4 vector4 = new Vector4();
248         /// vector4.S = 0.1f; 
249         /// // Please USE like this
250         /// float s = 0.1f, t = 0.5f, p = 0.9f, q = 1.0f;
251         /// Vector4 vector4 = new Vector4(s, t, p, q);
252         /// </code>
253         /// <since_tizen> 3 </since_tizen>
254         public float S
255         {
256             set
257             {
258                 Tizen.Log.Fatal("NUI", "Please do not use this setter, Deprecated in API8, will be removed in API10. please use new Vector4(...) constructor");
259
260                 Interop.Vector4.SSet(swigCPtr, value);
261                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
262
263                 callback?.Invoke(X, Y, Z, W);
264             }
265             get
266             {
267                 float ret = Interop.Vector4.SGet(swigCPtr);
268                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw new InvalidOperationException("FATAL: get Exception", NDalicPINVOKE.SWIGPendingException.Retrieve());
269                 return ret;
270             }
271         }
272
273         /// <summary>
274         /// The y component.
275         /// </summary>
276         /// <remarks>
277         /// The setter is deprecated in API8 and will be removed in API10. Please use new Vector4(...) constructor.
278         /// </remarks>
279         /// <code>
280         /// // DO NOT use like the followings!
281         /// Vector4 vector4 = new Vector4();
282         /// vector4.Y = 0.5f; 
283         /// // Please USE like this
284         /// float x = 0.1f, y = 0.5f, z = 0.9f, w = 1.0f;
285         /// Vector4 vector4 = new Vector4(x, y, z, w);
286         /// </code>
287         /// <since_tizen> 3 </since_tizen>
288         public float Y
289         {
290             set
291             {
292                 Tizen.Log.Fatal("NUI", "Please do not use this setter, Deprecated in API8, will be removed in API10. please use new Vector4(...) constructor");
293
294                 Interop.Vector4.YSet(swigCPtr, value);
295                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
296
297                 callback?.Invoke(X, Y, Z, W);
298             }
299             get
300             {
301                 float ret = Interop.Vector4.YGet(swigCPtr);
302                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw new InvalidOperationException("FATAL: get Exception", NDalicPINVOKE.SWIGPendingException.Retrieve());
303                 return ret;
304             }
305         }
306
307         /// <summary>
308         /// The green component.
309         /// </summary>
310         /// <remarks>
311         /// The setter is deprecated in API8 and will be removed in API10. Please use new Vector4(...) constructor.
312         /// </remarks>
313         /// <code>
314         /// // DO NOT use like the followings!
315         /// Vector4 vector4 = new Vector4();
316         /// vector4.G = 0.5f; 
317         /// // Please USE like this
318         /// float r = 0.1f, g = 0.5f, b = 0.9f, a = 1.0f;
319         /// Vector4 vector4 = new Vector4(r, g, b, a);
320         /// </code>
321         /// <since_tizen> 3 </since_tizen>
322         public float G
323         {
324             set
325             {
326                 Tizen.Log.Fatal("NUI", "Please do not use this setter, Deprecated in API8, will be removed in API10. please use new Vector4(...) constructor");
327
328                 Interop.Vector4.GSet(swigCPtr, value);
329                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
330
331                 callback?.Invoke(X, Y, Z, W);
332             }
333             get
334             {
335                 float ret = Interop.Vector4.GGet(swigCPtr);
336                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw new InvalidOperationException("FATAL: get Exception", NDalicPINVOKE.SWIGPendingException.Retrieve());
337                 return ret;
338             }
339         }
340
341         /// <summary>
342         /// The t component.
343         /// </summary>
344         /// <remarks>
345         /// The setter is deprecated in API8 and will be removed in API10. Please use new Vector4(...) constructor.
346         /// </remarks>
347         /// <code>
348         /// // DO NOT use like the followings!
349         /// Vector4 vector4 = new Vector4();
350         /// vector4.T = 0.5f; 
351         /// // Please USE like this
352         /// float s = 0.1f, t = 0.5f, p = 0.9f, q = 1.0f;
353         /// Vector4 vector4 = new Vector4(s, t, p, q);
354         /// </code>
355         /// <since_tizen> 3 </since_tizen>
356         public float T
357         {
358             set
359             {
360                 Tizen.Log.Fatal("NUI", "Please do not use this setter, Deprecated in API8, will be removed in API10. please use new Vector4(...) constructor");
361
362                 Interop.Vector4.TSet(swigCPtr, value);
363                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
364
365                 callback?.Invoke(X, Y, Z, W);
366             }
367             get
368             {
369                 float ret = Interop.Vector4.TGet(swigCPtr);
370                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw new InvalidOperationException("FATAL: get Exception", NDalicPINVOKE.SWIGPendingException.Retrieve());
371                 return ret;
372             }
373         }
374
375         /// <summary>
376         /// The z component.
377         /// </summary>
378         /// <remarks>
379         /// The setter is deprecated in API8 and will be removed in API10. Please use new Vector4(...) constructor.
380         /// </remarks>
381         /// <code>
382         /// // DO NOT use like the followings!
383         /// Vector4 vector4 = new Vector4();
384         /// vector4.Z = 0.9f; 
385         /// // Please USE like this
386         /// float x = 0.1f, y = 0.5f, z = 0.9f, w = 1.0f;
387         /// Vector4 vector4 = new Vector4(x, y, z, w);
388         /// </code>
389         /// <since_tizen> 3 </since_tizen>
390         public float Z
391         {
392             set
393             {
394                 Tizen.Log.Fatal("NUI", "Please do not use this setter, Deprecated in API8, will be removed in API10. please use new Vector4(...) constructor");
395
396                 Interop.Vector4.ZSet(swigCPtr, value);
397                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
398
399                 callback?.Invoke(X, Y, Z, W);
400             }
401             get
402             {
403                 float ret = Interop.Vector4.ZGet(swigCPtr);
404                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw new InvalidOperationException("FATAL: get Exception", NDalicPINVOKE.SWIGPendingException.Retrieve());
405                 return ret;
406             }
407         }
408
409         /// <summary>
410         /// The blue component.
411         /// </summary>
412         /// <remarks>
413         /// The setter is deprecated in API8 and will be removed in API10. Please use new Vector4(...) constructor.
414         /// </remarks>
415         /// <code>
416         /// // DO NOT use like the followings!
417         /// Vector4 vector4 = new Vector4();
418         /// vector4.B = 0.9f; 
419         /// // Please USE like this
420         /// float r = 0.1f, g = 0.5f, b = 0.9f, a = 1.0f;
421         /// Vector4 vector4 = new Vector4(r, g, b, a);
422         /// </code>
423         /// <since_tizen> 3 </since_tizen>
424         [Obsolete("Please do not use this setter, Deprecated in API8, will be removed in API10. please use new Vector4(...) constructor")]
425         public float B
426         {
427             set
428             {
429                 Tizen.Log.Fatal("NUI", "Please do not use this setter, Deprecated in API8, will be removed in API10. please use new Vector4(...) constructor");
430
431                 Interop.Vector4.BSet(swigCPtr, value);
432                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
433
434                 callback?.Invoke(X, Y, Z, W);
435             }
436             get
437             {
438                 float ret = Interop.Vector4.BGet(swigCPtr);
439                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw new InvalidOperationException("FATAL: get Exception", NDalicPINVOKE.SWIGPendingException.Retrieve());
440                 return ret;
441             }
442         }
443
444         /// <summary>
445         /// The p component.
446         /// </summary>
447         /// <remarks>
448         /// The setter is deprecated in API8 and will be removed in API10. Please use new Vector4(...) constructor.
449         /// </remarks>
450         /// <code>
451         /// // DO NOT use like the followings!
452         /// Vector4 vector4 = new Vector4();
453         /// vector4.P = 0.9f; 
454         /// // Please USE like this
455         /// float s = 0.1f, t = 0.5f, p = 0.9f, q = 1.0f;
456         /// Vector4 vector4 = new Vector4(s, t, p, q);
457         /// </code>
458         /// <since_tizen> 3 </since_tizen>
459         public float P
460         {
461             set
462             {
463                 Tizen.Log.Fatal("NUI", "Please do not use this setter, Deprecated in API8, will be removed in API10. please use new Vector4(...) constructor");
464
465                 Interop.Vector4.PSet(swigCPtr, value);
466                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
467
468                 callback?.Invoke(X, Y, Z, W);
469             }
470             get
471             {
472                 float ret = Interop.Vector4.PGet(swigCPtr);
473                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw new InvalidOperationException("FATAL: get Exception", NDalicPINVOKE.SWIGPendingException.Retrieve());
474                 return ret;
475             }
476         }
477
478         /// <summary>
479         /// The w component.
480         /// </summary>
481         /// <remarks>
482         /// The setter is deprecated in API8 and will be removed in API10. Please use new Vector4(...) constructor.
483         /// </remarks>
484         /// <code>
485         /// // DO NOT use like the followings!
486         /// Vector4 vector4 = new Vector4();
487         /// vector4.W = 1.0f; 
488         /// // Please USE like this
489         /// float x = 0.1f, y = 0.5f, z = 0.9f, w = 1.0f;
490         /// Vector4 vector4 = new Vector4(x, y, z, w);
491         /// </code>
492         /// <since_tizen> 3 </since_tizen>
493         public float W
494         {
495             set
496             {
497                 Tizen.Log.Fatal("NUI", "Please do not use this setter, Deprecated in API8, will be removed in API10. please use new Vector4(...) constructor");
498
499                 Interop.Vector4.WSet(swigCPtr, value);
500                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
501
502                 callback?.Invoke(X, Y, Z, W);
503             }
504             get
505             {
506                 float ret = Interop.Vector4.WGet(swigCPtr);
507                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw new InvalidOperationException("FATAL: get Exception", NDalicPINVOKE.SWIGPendingException.Retrieve());
508                 return ret;
509             }
510         }
511
512         /// <summary>
513         /// The alpha component.
514         /// </summary>
515         /// <remarks>
516         /// The setter is deprecated in API8 and will be removed in API10. Please use new Vector4(...) constructor.
517         /// </remarks>
518         /// <code>
519         /// // DO NOT use like the followings!
520         /// Vector4 vector4 = new Vector4();
521         /// vector4.A = 1.0f; 
522         /// // Please USE like this
523         /// float r = 0.1f, g = 0.5f, b = 0.9f, a = 1.0f;
524         /// Vector4 vector4 = new Vector4(r, g, b, a);
525         /// </code>
526         /// <since_tizen> 3 </since_tizen>
527         public float A
528         {
529             set
530             {
531                 Tizen.Log.Fatal("NUI", "Please do not use this setter, Deprecated in API8, will be removed in API10. please use new Vector4(...) constructor");
532
533                 Interop.Vector4.ASet(swigCPtr, value);
534                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
535
536                 callback?.Invoke(X, Y, Z, W);
537             }
538             get
539             {
540                 float ret = Interop.Vector4.AGet(swigCPtr);
541                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw new InvalidOperationException("FATAL: get Exception", NDalicPINVOKE.SWIGPendingException.Retrieve());
542                 return ret;
543             }
544         }
545
546         /// <summary>
547         /// The q component.
548         /// </summary>
549         /// <remarks>
550         /// The setter is deprecated in API8 and will be removed in API10. Please use new Vector4(...) constructor.
551         /// </remarks>
552         /// <code>
553         /// // DO NOT use like the followings!
554         /// Vector4 vector4 = new Vector4();
555         /// vector4.Q = 1.0f; 
556         /// // Please USE like this
557         /// float s = 0.1f, t = 0.5f, p = 0.9f, q = 1.0f;
558         /// Vector4 vector4 = new Vector4(s, t, p, q);
559         /// </code>
560         /// <since_tizen> 3 </since_tizen>
561         public float Q
562         {
563             set
564             {
565                 Tizen.Log.Fatal("NUI", "Please do not use this setter, Deprecated in API8, will be removed in API10. please use new Vector4(...) constructor");
566
567                 Interop.Vector4.QSet(swigCPtr, value);
568                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
569
570                 callback?.Invoke(X, Y, Z, W);
571             }
572             get
573             {
574                 float ret = Interop.Vector4.QGet(swigCPtr);
575                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw new InvalidOperationException("FATAL: get Exception", NDalicPINVOKE.SWIGPendingException.Retrieve());
576                 return ret;
577             }
578         }
579
580         /// <summary>
581         /// The array subscript operator overload.
582         /// </summary>
583         /// <param name="index">The subscript index.</param>
584         /// <returns>The float at the given index.</returns>
585         /// <since_tizen> 3 </since_tizen>
586         public float this[uint index]
587         {
588             get
589             {
590                 return ValueOfIndex(index);
591             }
592         }
593
594
595         /// <summary>
596         /// The addition operator.
597         /// </summary>
598         /// <param name="arg1">The first value.</param>
599         /// <param name="arg2">The second value.</param>
600         /// <returns>The vector containing the result of the addition.</returns>
601         /// <since_tizen> 3 </since_tizen>
602         public static Vector4 operator +(Vector4 arg1, Vector4 arg2)
603         {
604             return arg1?.Add(arg2);
605         }
606
607         /// <summary>
608         /// The subtraction operator.
609         /// </summary>
610         /// <param name="arg1">The first value.</param>
611         /// <param name="arg2">The second value.</param>
612         /// <returns>The vector containing the result of the subtraction.</returns>
613         /// <since_tizen> 3 </since_tizen>
614         public static Vector4 operator -(Vector4 arg1, Vector4 arg2)
615         {
616             return arg1?.Subtract(arg2);
617         }
618
619         /// <summary>
620         /// The unary negation operator.
621         /// </summary>
622         /// <param name="arg1">The target value.</param>
623         /// <returns>The vector containing the negation.</returns>
624         /// <since_tizen> 3 </since_tizen>
625         public static Vector4 operator -(Vector4 arg1)
626         {
627             return arg1?.Subtract();
628         }
629
630         /// <summary>
631         /// The multiplication operator.
632         /// </summary>
633         /// <param name="arg1">The first value.</param>
634         /// <param name="arg2">The second value.</param>
635         /// <returns>The vector containing the result of the multiplication.</returns>
636         /// <since_tizen> 3 </since_tizen>
637         public static Vector4 operator *(Vector4 arg1, Vector4 arg2)
638         {
639             return arg1?.Multiply(arg2);
640         }
641
642         /// <summary>
643         /// The multiplication operator.
644         /// </summary>
645         /// <param name="arg1">The first value.</param>
646         /// <param name="arg2">The float value to scale the vector.</param>
647         /// <returns>The vector containing the result of scaling.</returns>
648         /// <since_tizen> 3 </since_tizen>
649         public static Vector4 operator *(Vector4 arg1, float arg2)
650         {
651             return arg1?.Multiply(arg2);
652         }
653
654         /// <summary>
655         /// The division operator.
656         /// </summary>
657         /// <param name="arg1">The first value.</param>
658         /// <param name="arg2">The second value.</param>
659         /// <returns>The vector containing the result of the division.</returns>
660         /// <since_tizen> 3 </since_tizen>
661         public static Vector4 operator /(Vector4 arg1, Vector4 arg2)
662         {
663             return arg1?.Divide(arg2);
664         }
665
666         /// <summary>
667         /// The division operator.
668         /// </summary>
669         /// <param name="arg1">The first value.</param>
670         /// <param name="arg2">The float value to scale the vector by.</param>
671         /// <returns>The vector containing the result of scaling.</returns>
672         /// <since_tizen> 3 </since_tizen>
673         public static Vector4 operator /(Vector4 arg1, float arg2)
674         {
675             return arg1?.Divide(arg2);
676         }
677
678         /// <summary>
679         /// Determines whether the specified object is equal to the current object.
680         /// </summary>
681         /// <param name="obj">The object to compare with the current object.</param>
682         /// <returns>true if the specified object is equal to the current object; otherwise, false.</returns>
683         public override bool Equals(System.Object obj)
684         {
685             Vector4 vector4 = obj as Vector4;
686             bool equal = false;
687             if (X == vector4?.X && Y == vector4?.Y && Z == vector4?.Z && W == vector4?.W)
688             {
689                 equal = true;
690             }
691             return equal;
692         }
693
694         /// <summary>
695         /// Gets the the hash code of this Vector4.
696         /// </summary>
697         /// <returns>The Hash Code.</returns>
698         /// <since_tizen> 6 </since_tizen>
699         public override int GetHashCode()
700         {
701             return swigCPtr.Handle.GetHashCode();
702         }
703
704         /// <summary>
705         /// Returns the length of the vector.
706         /// </summary>
707         /// <returns>The length.</returns>
708         /// <since_tizen> 3 </since_tizen>
709         public float Length()
710         {
711             float ret = Interop.Vector4.Length(swigCPtr);
712             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
713             return ret;
714         }
715
716         /// <summary>
717         /// Returns the length of the vector squared.<br />
718         /// This is faster than using Length() when performing
719         /// threshold checks as it avoids use of the square root.<br />
720         /// </summary>
721         /// <returns>The length of the vector squared.</returns>
722         /// <since_tizen> 3 </since_tizen>
723         public float LengthSquared()
724         {
725             float ret = Interop.Vector4.LengthSquared(swigCPtr);
726             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
727             return ret;
728         }
729
730         /// <summary>
731         /// Normalizes the vector.<br />
732         /// Sets the vector to unit length whilst maintaining its direction.<br />
733         /// </summary>
734         /// <since_tizen> 3 </since_tizen>
735         public void Normalize()
736         {
737             Interop.Vector4.Normalize(swigCPtr);
738             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
739         }
740
741         /// <summary>
742         /// Clamps the vector between minimum and maximum vectors.
743         /// </summary>
744         /// <param name="min">The minimum vector.</param>
745         /// <param name="max">The maximum vector.</param>
746         /// <since_tizen> 3 </since_tizen>
747         public void Clamp(Vector4 min, Vector4 max)
748         {
749             Interop.Vector4.Clamp(swigCPtr, Vector4.getCPtr(min), Vector4.getCPtr(max));
750             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
751         }
752
753         /// <inheritdoc/>
754         [EditorBrowsable(EditorBrowsableState.Never)]
755         public object Clone() => new Vector4(X, Y, Z, W);
756
757         internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Vector4 obj)
758         {
759             return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
760         }
761
762         internal static Vector4 GetVector4FromPtr(global::System.IntPtr cPtr)
763         {
764             Vector4 ret = new Vector4(cPtr, false);
765             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
766             return ret;
767         }
768
769         internal SWIGTYPE_p_float AsFloat()
770         {
771             global::System.IntPtr cPtr = Interop.Vector4.AsFloat(swigCPtr);
772             SWIGTYPE_p_float ret = (cPtr == global::System.IntPtr.Zero) ? null : new SWIGTYPE_p_float(cPtr);
773             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
774             return ret;
775         }
776
777         internal float Dot(Vector3 other)
778         {
779             float ret = Interop.Vector4.DotWithVector3(swigCPtr, Vector3.getCPtr(other));
780             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
781             return ret;
782         }
783
784         internal float Dot(Vector4 other)
785         {
786             float ret = Interop.Vector4.Dot(swigCPtr, Vector4.getCPtr(other));
787             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
788             return ret;
789         }
790
791         internal float Dot4(Vector4 other)
792         {
793             float ret = Interop.Vector4.Dot4(swigCPtr, Vector4.getCPtr(other));
794             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
795             return ret;
796         }
797
798         internal Vector4 Cross(Vector4 other)
799         {
800             Vector4 ret = new Vector4(Interop.Vector4.Cross(swigCPtr, Vector4.getCPtr(other)), true);
801             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
802             return ret;
803         }
804
805         /// This will not be public opened.
806         [EditorBrowsable(EditorBrowsableState.Never)]
807         protected override void ReleaseSwigCPtr(System.Runtime.InteropServices.HandleRef swigCPtr)
808         {
809             Interop.Vector4.DeleteVector4(swigCPtr);
810         }
811
812         private Vector4 Add(Vector4 rhs)
813         {
814             Vector4 ret = new Vector4(Interop.Vector4.Add(swigCPtr, Vector4.getCPtr(rhs)), true);
815             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
816             return ret;
817         }
818
819         private Vector4 AddAssign(Vector4 rhs)
820         {
821             Vector4 ret = new Vector4(Interop.Vector4.AddAssign(swigCPtr, Vector4.getCPtr(rhs)), false);
822             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
823             return ret;
824         }
825
826         private Vector4 Subtract(Vector4 rhs)
827         {
828             Vector4 ret = new Vector4(Interop.Vector4.Subtract(swigCPtr, Vector4.getCPtr(rhs)), true);
829             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
830             return ret;
831         }
832
833         private Vector4 SubtractAssign(Vector4 rhs)
834         {
835             Vector4 ret = new Vector4(Interop.Vector4.SubtractAssign(swigCPtr, Vector4.getCPtr(rhs)), false);
836             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
837             return ret;
838         }
839
840         private Vector4 Multiply(Vector4 rhs)
841         {
842             Vector4 ret = new Vector4(Interop.Vector4.Multiply(swigCPtr, Vector4.getCPtr(rhs)), true);
843             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
844             return ret;
845         }
846
847         private Vector4 Multiply(float rhs)
848         {
849             Vector4 ret = new Vector4(Interop.Vector4.Multiply(swigCPtr, rhs), true);
850             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
851             return ret;
852         }
853
854         private Vector4 MultiplyAssign(Vector4 rhs)
855         {
856             Vector4 ret = new Vector4(Interop.Vector4.MultiplyAssign(swigCPtr, Vector4.getCPtr(rhs)), false);
857             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
858             return ret;
859         }
860
861         private Vector4 MultiplyAssign(float rhs)
862         {
863             Vector4 ret = new Vector4(Interop.Vector4.MultiplyAssign(swigCPtr, rhs), false);
864             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
865             return ret;
866         }
867
868         private Vector4 Divide(Vector4 rhs)
869         {
870             Vector4 ret = new Vector4(Interop.Vector4.Divide(swigCPtr, Vector4.getCPtr(rhs)), true);
871             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
872             return ret;
873         }
874
875         private Vector4 Divide(float rhs)
876         {
877             Vector4 ret = new Vector4(Interop.Vector4.Divide(swigCPtr, rhs), true);
878             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
879             return ret;
880         }
881
882         private Vector4 DivideAssign(Vector4 rhs)
883         {
884             Vector4 ret = new Vector4(Interop.Vector4.DivideAssign(swigCPtr, Vector4.getCPtr(rhs)), false);
885             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
886             return ret;
887         }
888
889         private Vector4 DivideAssign(float rhs)
890         {
891             Vector4 ret = new Vector4(Interop.Vector4.DivideAssign(swigCPtr, rhs), false);
892             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
893             return ret;
894         }
895
896         private Vector4 Subtract()
897         {
898             Vector4 ret = new Vector4(Interop.Vector4.Subtract(swigCPtr), true);
899             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
900             return ret;
901         }
902
903         private bool EqualTo(Vector4 rhs)
904         {
905             bool ret = Interop.Vector4.EqualTo(swigCPtr, Vector4.getCPtr(rhs));
906             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
907             return ret;
908         }
909
910         private bool NotEqualTo(Vector4 rhs)
911         {
912             bool ret = Interop.Vector4.NotEqualTo(swigCPtr, Vector4.getCPtr(rhs));
913             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
914             return ret;
915         }
916
917         private float ValueOfIndex(uint index)
918         {
919             float ret = Interop.Vector4.ValueOfIndex(swigCPtr, index);
920             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
921             return ret;
922         }
923
924     }
925
926 }