[NUI] Remove [Obsolete()] attribute
[platform/core/csapi/tizenfx.git] / src / Tizen.NUI / src / public / Vector3.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 three-dimensional vector.
26     /// </summary>
27     /// <since_tizen> 3 </since_tizen>
28     [Binding.TypeConverter(typeof(Vector3TypeConverter))]
29     public class Vector3 : Disposable, ICloneable
30     {
31         /// <summary>
32         /// The constructor.
33         /// </summary>
34         /// <since_tizen> 3 </since_tizen>
35         public Vector3() : this(Interop.Vector3.new_Vector3__SWIG_0(), true)
36         {
37             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
38         }
39
40         /// <summary>
41         /// The default constructor initializes the vector to 0.
42         /// </summary>
43         /// <param name="x">The x (or width) component.</param>
44         /// <param name="y">The y (or height) component.</param>
45         /// <param name="z">The z (or depth) component.</param>
46         /// <since_tizen> 3 </since_tizen>
47         public Vector3(float x, float y, float z) : this(Interop.Vector3.new_Vector3__SWIG_1(x, y, z), true)
48         {
49             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
50         }
51
52         /// <summary>
53         /// Conversion constructor from an array of three floats.
54         /// </summary>
55         /// <param name="array">An array of xyz.</param>
56         /// <since_tizen> 3 </since_tizen>
57         public Vector3(float[] array) : this(Interop.Vector3.new_Vector3__SWIG_2(array), true)
58         {
59             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
60         }
61
62         /// <summary>
63         /// The constructor.
64         /// </summary>
65         /// <param name="vec2">Vector2 to create this vector from.</param>
66         /// <since_tizen> 3 </since_tizen>
67         public Vector3(Vector2 vec2) : this(Interop.Vector3.new_Vector3__SWIG_3(Vector2.getCPtr(vec2)), true)
68         {
69             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
70         }
71
72         /// <summary>
73         /// The constructor.
74         /// </summary>
75         /// <param name="vec4">Vector4 to create this vector from.</param>
76         /// <since_tizen> 3 </since_tizen>
77         public Vector3(Vector4 vec4) : this(Interop.Vector3.new_Vector3__SWIG_4(Vector4.getCPtr(vec4)), true)
78         {
79             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
80         }
81
82         internal Vector3(global::System.IntPtr cPtr, bool cMemoryOwn) : base(cPtr, cMemoryOwn)
83         {
84         }
85
86         internal Vector3(Vector3ChangedCallback cb, float x, float y, float z) : this(Interop.Vector3.new_Vector3__SWIG_1(x, y, z), true)
87         {
88             callback = cb;
89             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
90         }
91         internal delegate void Vector3ChangedCallback(float x, float y, float z);
92         private Vector3ChangedCallback callback = null;
93
94         /// <summary>
95         /// (1.0f,1.0f,1.0f).
96         /// </summary>
97         /// <since_tizen> 3 </since_tizen>
98         public static Vector3 One
99         {
100             get
101             {
102                 global::System.IntPtr cPtr = Interop.Vector3.Vector3_ONE_get();
103                 Vector3 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector3(cPtr, false);
104                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
105                 return ret;
106             }
107         }
108
109         /// <summary>
110         /// The vector representing the x-axis.
111         /// </summary>
112         /// <since_tizen> 3 </since_tizen>
113         public static Vector3 XAxis
114         {
115             get
116             {
117                 global::System.IntPtr cPtr = Interop.Vector3.Vector3_XAXIS_get();
118                 Vector3 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector3(cPtr, false);
119                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
120                 return ret;
121             }
122         }
123
124         /// <summary>
125         /// The vector representing the y-axis.
126         /// </summary>
127         /// <since_tizen> 3 </since_tizen>
128         public static Vector3 YAxis
129         {
130             get
131             {
132                 global::System.IntPtr cPtr = Interop.Vector3.Vector3_YAXIS_get();
133                 Vector3 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector3(cPtr, false);
134                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
135                 return ret;
136             }
137         }
138
139         /// <summary>
140         /// The vector representing the z-axis.
141         /// </summary>
142         /// <since_tizen> 3 </since_tizen>
143         public static Vector3 ZAxis
144         {
145             get
146             {
147                 global::System.IntPtr cPtr = Interop.Vector3.Vector3_ZAXIS_get();
148                 Vector3 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector3(cPtr, false);
149                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
150                 return ret;
151             }
152         }
153
154         /// <summary>
155         /// The vector representing the negative x-axis.
156         /// </summary>
157         /// <since_tizen> 3 </since_tizen>
158         public static Vector3 NegativeXAxis
159         {
160             get
161             {
162                 global::System.IntPtr cPtr = Interop.Vector3.Vector3_NEGATIVE_XAXIS_get();
163                 Vector3 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector3(cPtr, false);
164                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
165                 return ret;
166             }
167         }
168
169         /// <summary>
170         /// Th vector representing the negative y-axis.
171         /// </summary>
172         /// <since_tizen> 3 </since_tizen>
173         public static Vector3 NegativeYAxis
174         {
175             get
176             {
177                 global::System.IntPtr cPtr = Interop.Vector3.Vector3_NEGATIVE_YAXIS_get();
178                 Vector3 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector3(cPtr, false);
179                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
180                 return ret;
181             }
182         }
183
184         /// <summary>
185         /// The vector representing the negative z-axis.
186         /// </summary>
187         /// <since_tizen> 3 </since_tizen>
188         public static Vector3 NegativeZAxis
189         {
190             get
191             {
192                 global::System.IntPtr cPtr = Interop.Vector3.Vector3_NEGATIVE_ZAXIS_get();
193                 Vector3 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector3(cPtr, false);
194                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
195                 return ret;
196             }
197         }
198
199         /// <summary>
200         /// (0.0f, 0.0f, 0.0f).
201         /// </summary>
202         /// <since_tizen> 3 </since_tizen>
203         public static Vector3 Zero
204         {
205             get
206             {
207                 global::System.IntPtr cPtr = Interop.Vector3.Vector3_ZERO_get();
208                 Vector3 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector3(cPtr, false);
209                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
210                 return ret;
211             }
212         }
213
214         /// <summary>
215         /// The x component.
216         /// </summary>
217         /// <remarks>
218         /// The setter is deprecated in API8 and will be removed in API10. Please use new Vector3(...) constructor.
219         /// </remarks>
220         /// <code>
221         /// // DO NOT use like the followings!
222         /// Vector3 vector3 = new Vector3();
223         /// vector3.X = 0.1f; 
224         /// // Please USE like this
225         /// float x = 0.1f, y = 0.5f, z = 0.9f;
226         /// Vector3 vector3 = new Vector3(x, y, z);
227         /// </code>
228         /// <since_tizen> 3 </since_tizen>
229         public float X
230         {
231             set
232             {
233                 Tizen.Log.Fatal("NUI", "Please do not use this setter, Deprecated in API8, will be removed in API10. please use new Vector3(...) constructor");
234
235                 Interop.Vector3.Vector3_X_set(swigCPtr, value);
236                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
237
238                 callback?.Invoke(X, Y, Z);
239             }
240             get
241             {
242                 float ret = Interop.Vector3.Vector3_X_get(swigCPtr);
243                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
244                 return ret;
245             }
246         }
247
248         /// <summary>
249         /// The width component.
250         /// </summary>
251         /// <remarks>
252         /// The setter is deprecated in API8 and will be removed in API10. Please use new Vector3(...) constructor.
253         /// </remarks>
254         /// <code>
255         /// // DO NOT use like the followings!
256         /// Vector3 vector3 = new Vector3();
257         /// vector3.Width = 1.0f; 
258         /// // Please USE like this
259         /// float width = 1.0f, height = 2.0f, depth = 3.0f;
260         /// Vector3 vector3 = new Vector3(width, height, depth);
261         /// </code>
262         /// <since_tizen> 3 </since_tizen>
263         [Obsolete("Please do not use this setter, Deprecated in API8, will be removed in API10. please use new Vector3(...) constructor")]
264         public float Width
265         {
266             set
267             {
268                 Tizen.Log.Fatal("NUI", "Please do not use this setter, Deprecated in API8, will be removed in API10. please use new Vector3(...) constructor");
269
270                 Interop.Vector3.Vector3_Width_set(swigCPtr, value);
271                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
272
273                 callback?.Invoke(X, Y, Z);
274             }
275             get
276             {
277                 float ret = Interop.Vector3.Vector3_Width_get(swigCPtr);
278                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
279                 return ret;
280             }
281         }
282
283         /// <summary>
284         /// The red component.
285         /// </summary>
286         /// <remarks>
287         /// The setter is deprecated in API8 and will be removed in API10. Please use new Vector3(...) constructor.
288         /// </remarks>
289         /// <code>
290         /// // DO NOT use like the followings!
291         /// Vector3 vector3 = new Vector3();
292         /// vector3.R = 0.1f; 
293         /// // Please USE like this
294         /// float r = 0.1f, g = 0.5f, b = 0.9f;
295         /// Vector3 vector3 = new Vector3(r, g, b);
296         /// </code>
297         /// <since_tizen> 3 </since_tizen>
298         public float R
299         {
300             set
301             {
302                 Tizen.Log.Fatal("NUI", "Please do not use this setter, Deprecated in API8, will be removed in API10. please use new Vector3(...) constructor");
303
304                 Interop.Vector3.Vector3_r_set(swigCPtr, value);
305                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
306
307                 callback?.Invoke(X, Y, Z);
308             }
309             get
310             {
311                 float ret = Interop.Vector3.Vector3_r_get(swigCPtr);
312                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
313                 return ret;
314             }
315         }
316
317         /// <summary>
318         /// The y component.
319         /// </summary>
320         /// <remarks>
321         /// The setter is deprecated in API8 and will be removed in API10. Please use new Vector3(...) constructor.
322         /// </remarks>
323         /// <code>
324         /// // DO NOT use like the followings!
325         /// Vector3 vector3 = new Vector3();
326         /// vector3.Y = 0.5f; 
327         /// // Please USE like this
328         /// float x = 0.1f, y = 0.5f, z = 0.9f;
329         /// Vector3 vector3 = new Vector3(x, y, z);
330         /// </code>
331         /// <since_tizen> 3 </since_tizen>
332         public float Y
333         {
334             set
335             {
336                 Tizen.Log.Fatal("NUI", "Please do not use this setter, Deprecated in API8, will be removed in API10. please use new Vector3(...) constructor");
337
338                 Interop.Vector3.Vector3_Y_set(swigCPtr, value);
339                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
340
341                 callback?.Invoke(X, Y, Z);
342             }
343             get
344             {
345                 float ret = Interop.Vector3.Vector3_Y_get(swigCPtr);
346                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
347                 return ret;
348             }
349         }
350
351         /// <summary>
352         /// The height component.
353         /// </summary>
354         /// <remarks>
355         /// The setter is deprecated in API8 and will be removed in API10. Please use new Vector3(...) constructor.
356         /// </remarks>
357         /// <code>
358         /// // DO NOT use like the followings!
359         /// Vector3 vector3 = new Vector3();
360         /// vector3.Height = 2.0f; 
361         /// // Please USE like this
362         /// float width = 1.0f, height = 2.0f, depth = 3.0f;
363         /// Vector3 vector3 = new Vector3(width, height, depth);
364         /// </code>
365         /// <since_tizen> 3 </since_tizen>
366         public float Height
367         {
368             set
369             {
370                 Tizen.Log.Fatal("NUI", "Please do not use this setter, Deprecated in API8, will be removed in API10. please use new Vector3(...) constructor");
371
372                 Interop.Vector3.Vector3_Height_set(swigCPtr, value);
373                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
374
375                 callback?.Invoke(X, Y, Z);
376             }
377             get
378             {
379                 float ret = Interop.Vector3.Vector3_Height_get(swigCPtr);
380                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
381                 return ret;
382             }
383         }
384
385         /// <summary>
386         /// The green component.
387         /// </summary>
388         /// <remarks>
389         /// The setter is deprecated in API8 and will be removed in API10. Please use new Vector3(...) constructor.
390         /// </remarks>
391         /// <code>
392         /// // DO NOT use like the followings!
393         /// Vector3 vector3 = new Vector3();
394         /// vector3.G = 0.5f; 
395         /// // Please USE like this
396         /// float r = 0.1f, g = 0.5f, b = 0.9f;
397         /// Vector3 vector3 = new Vector3(r, g, b);
398         /// </code>
399         /// <since_tizen> 3 </since_tizen>
400         public float G
401         {
402             set
403             {
404                 Tizen.Log.Fatal("NUI", "Please do not use this setter, Deprecated in API8, will be removed in API10. please use new Vector3(...) constructor");
405
406                 Interop.Vector3.Vector3_g_set(swigCPtr, value);
407                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
408
409                 callback?.Invoke(X, Y, Z);
410             }
411             get
412             {
413                 float ret = Interop.Vector3.Vector3_g_get(swigCPtr);
414                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
415                 return ret;
416             }
417         }
418
419         /// <summary>
420         /// The z component.
421         /// </summary>
422         /// <remarks>
423         /// The setter is deprecated in API8 and will be removed in API10. Please use new Vector3(...) constructor.
424         /// </remarks>
425         /// <code>
426         /// // DO NOT use like the followings!
427         /// Vector3 vector3 = new Vector3();
428         /// vector3.Z = 0.9f; 
429         /// // Please USE like this
430         /// float x = 0.1f, y = 0.5f, z = 0.9f;
431         /// Vector3 vector3 = new Vector3(x, y, z);
432         /// </code>
433         /// <since_tizen> 3 </since_tizen>
434         public float Z
435         {
436             set
437             {
438                 Tizen.Log.Fatal("NUI", "Please do not use this setter, Deprecated in API8, will be removed in API10. please use new Vector3(...) constructor");
439
440                 Interop.Vector3.Vector3_Z_set(swigCPtr, value);
441                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
442
443                 callback?.Invoke(X, Y, Z);
444             }
445             get
446             {
447                 float ret = Interop.Vector3.Vector3_Z_get(swigCPtr);
448                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
449                 return ret;
450             }
451         }
452
453         /// <summary>
454         /// The depth component.
455         /// </summary>
456         /// <remarks>
457         /// The setter is deprecated in API8 and will be removed in API10. Please use new Vector3(...) constructor.
458         /// </remarks>
459         /// <code>
460         /// // DO NOT use like the followings!
461         /// Vector3 vector3 = new Vector3();
462         /// vector3.Depth = 3.0f; 
463         /// // Please USE like this
464         /// float width = 1.0f, height = 2.0f, depth = 3.0f;
465         /// Vector3 vector3 = new Vector3(width, height, depth);
466         /// </code>
467         /// <since_tizen> 3 </since_tizen>
468         [Obsolete("Please do not use this setter, Deprecated in API8, will be removed in API10. please use new Vector3(...) constructor")]
469         public float Depth
470         {
471             set
472             {
473                 Tizen.Log.Fatal("NUI", "Please do not use this setter, Deprecated in API8, will be removed in API10. please use new Vector3(...) constructor");
474
475                 Interop.Vector3.Vector3_Depth_set(swigCPtr, value);
476                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
477
478                 callback?.Invoke(X, Y, Z);
479             }
480             get
481             {
482                 float ret = Interop.Vector3.Vector3_Depth_get(swigCPtr);
483                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
484                 return ret;
485             }
486         }
487
488         /// <summary>
489         /// The blue component.
490         /// </summary>
491         /// <remarks>
492         /// The setter is deprecated in API8 and will be removed in API10. Please use new Vector3(...) constructor.
493         /// </remarks>
494         /// <code>
495         /// // DO NOT use like the followings!
496         /// Vector3 vector3 = new Vector3();
497         /// vector3.B = 0.9f; 
498         /// // Please USE like this
499         /// float r = 0.1f, g = 0.5f, b = 0.9f;
500         /// Vector3 vector3 = new Vector3(r, g, b);
501         /// </code>
502         /// <since_tizen> 3 </since_tizen>
503         public float B
504         {
505             set
506             {
507                 Tizen.Log.Fatal("NUI", "Please do not use this setter, Deprecated in API8, will be removed in API10. please use new Vector3(...) constructor");
508
509                 Interop.Vector3.Vector3_b_set(swigCPtr, value);
510                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
511
512                 callback?.Invoke(X, Y, Z);
513             }
514             get
515             {
516                 float ret = Interop.Vector3.Vector3_b_get(swigCPtr);
517                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
518                 return ret;
519             }
520         }
521
522         /// <summary>
523         /// An array subscript operator overload.
524         /// </summary>
525         /// <param name="index">The subscript index.</param>
526         /// <returns>The float at the given index.</returns>
527         /// <since_tizen> 3 </since_tizen>
528         public float this[uint index]
529         {
530             get
531             {
532                 return ValueOfIndex(index);
533             }
534         }
535
536         /// <summary>
537         /// The addition operator.
538         /// </summary>
539         /// <param name="arg1">The first value.</param>
540         /// <param name="arg2">The second value.</param>
541         /// <returns>The vector containing the result of the addition.</returns>
542         /// <since_tizen> 3 </since_tizen>
543         public static Vector3 operator +(Vector3 arg1, Vector3 arg2)
544         {
545             return arg1?.Add(arg2);
546         }
547
548         /// <summary>
549         /// The subtraction operator.
550         /// </summary>
551         /// <param name="arg1">The first value.</param>
552         /// <param name="arg2">The second value.</param>
553         /// <returns>The vector containing the result of the subtraction.</returns>
554         /// <since_tizen> 3 </since_tizen>
555         public static Vector3 operator -(Vector3 arg1, Vector3 arg2)
556         {
557             return arg1?.Subtract(arg2);
558         }
559
560         /// <summary>
561         /// The unary negation operator.
562         /// </summary>
563         /// <param name="arg1">The target value.</param>
564         /// <returns>The vector containg the negation.</returns>
565         /// <since_tizen> 3 </since_tizen>
566         public static Vector3 operator -(Vector3 arg1)
567         {
568             return arg1?.Subtract();
569         }
570
571         /// <summary>
572         /// The multiplication operator.
573         /// </summary>
574         /// <param name="arg1">The first value.</param>
575         /// <param name="arg2">The second value.</param>
576         /// <returns>The vector containing the result of the multiplication.</returns>
577         /// <since_tizen> 3 </since_tizen>
578         public static Vector3 operator *(Vector3 arg1, Vector3 arg2)
579         {
580             return arg1?.Multiply(arg2);
581         }
582
583         /// <summary>
584         /// The multiplication operator.
585         /// </summary>
586         /// <param name="arg1">The first value.</param>
587         /// <param name="arg2">The float value to scale the vector.</param>
588         /// <returns>The vector containing the result of the scaling.</returns>
589         /// <since_tizen> 3 </since_tizen>
590         public static Vector3 operator *(Vector3 arg1, float arg2)
591         {
592             return arg1?.Multiply(arg2);
593         }
594
595         /// <summary>
596         /// The division 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 division.</returns>
601         /// <since_tizen> 3 </since_tizen>
602         public static Vector3 operator /(Vector3 arg1, Vector3 arg2)
603         {
604             return arg1?.Divide(arg2);
605         }
606
607         /// <summary>
608         /// The division operator.
609         /// </summary>
610         /// <param name="arg1">The first value.</param>
611         /// <param name="arg2">The float value to scale the vector by.</param>
612         /// <returns>The vector containing the result of the scaling.</returns>
613         /// <since_tizen> 3 </since_tizen>
614         public static Vector3 operator /(Vector3 arg1, float arg2)
615         {
616             return arg1?.Divide(arg2);
617         }
618
619         /// <summary>
620         /// Determines whether the specified object is equal to the current object.
621         /// </summary>
622         /// <param name="obj">The object to compare with the current object.</param>
623         /// <returns>true if the specified object is equal to the current object; otherwise, false.</returns>
624         public override bool Equals(System.Object obj)
625         {
626             Vector3 vector3 = obj as Vector3;
627             bool equal = false;
628             if (X == vector3?.X && Y == vector3?.Y && Z == vector3?.Z)
629             {
630                 equal = true;
631             }
632             return equal;
633         }
634
635         /// <summary>
636         /// Gets the the hash code of this Vector3.
637         /// </summary>
638         /// <returns>The Hash Code.</returns>
639         /// <since_tizen> 6 </since_tizen>
640         public override int GetHashCode()
641         {
642             return swigCPtr.Handle.GetHashCode();
643         }
644
645         /// <summary>
646         /// Returns the length of the vector.
647         /// </summary>
648         /// <returns>The length of the vector.</returns>
649         /// <since_tizen> 3 </since_tizen>
650         public float Length()
651         {
652             float ret = Interop.Vector3.Vector3_Length(swigCPtr);
653             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
654             return ret;
655         }
656
657         /// <summary>
658         /// Returns the length of the vector squared.<br />
659         /// This is more efficient than Length() for threshold
660         /// testing as it avoids the use of a square root.<br />
661         /// </summary>
662         /// <returns>The length of the vector squared.</returns>
663         /// <since_tizen> 3 </since_tizen>
664         public float LengthSquared()
665         {
666             float ret = Interop.Vector3.Vector3_LengthSquared(swigCPtr);
667             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
668             return ret;
669         }
670
671         /// <summary>
672         /// Sets the vector to be unit length, whilst maintaining its direction.
673         /// </summary>
674         /// <since_tizen> 3 </since_tizen>
675         public void Normalize()
676         {
677             Interop.Vector3.Vector3_Normalize(swigCPtr);
678             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
679         }
680
681         /// <summary>
682         /// Clamps the vector between minimum and maximum vectors.
683         /// </summary>
684         /// <param name="min">The minimum vector.</param>
685         /// <param name="max">The maximum vector.</param>
686         /// <since_tizen> 3 </since_tizen>
687         public void Clamp(Vector3 min, Vector3 max)
688         {
689             Interop.Vector3.Vector3_Clamp(swigCPtr, Vector3.getCPtr(min), Vector3.getCPtr(max));
690             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
691         }
692
693         /// <summary>
694         /// Returns the x and y components (or width and height, or r and g) as a Vector2.
695         /// </summary>
696         /// <returns>The partial vector contents as Vector2 (x,y).</returns>
697         /// <since_tizen> 3 </since_tizen>
698         public Vector2 GetVectorXY()
699         {
700             Vector2 ret = new Vector2(Interop.Vector3.Vector3_GetVectorXY__SWIG_0(swigCPtr), false);
701             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
702             return ret;
703         }
704
705         /// <summary>
706         /// Returns the y and z components (or height and depth, or g and b) as a Vector2.
707         /// </summary>
708         /// <returns>The partial vector contents as Vector2 (y,z).</returns>
709         /// <since_tizen> 3 </since_tizen>
710         public Vector2 GetVectorYZ()
711         {
712             Vector2 ret = new Vector2(Interop.Vector3.Vector3_GetVectorYZ__SWIG_0(swigCPtr), false);
713             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
714             return ret;
715         }
716
717         /// <inheritdoc/>
718         [EditorBrowsable(EditorBrowsableState.Never)]
719         public object Clone() => new Vector3(X, Y, Z);
720
721         internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Vector3 obj)
722         {
723             return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
724         }
725
726         internal static Vector3 GetVector3FromPtr(global::System.IntPtr cPtr)
727         {
728             Vector3 ret = new Vector3(cPtr, false);
729             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
730             return ret;
731         }
732
733         internal SWIGTYPE_p_float AsFloat()
734         {
735             global::System.IntPtr cPtr = Interop.Vector3.Vector3_AsFloat__SWIG_0(swigCPtr);
736             SWIGTYPE_p_float ret = (cPtr == global::System.IntPtr.Zero) ? null : new SWIGTYPE_p_float(cPtr, false);
737             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
738             return ret;
739         }
740
741         /// This will not be public opened.
742         [EditorBrowsable(EditorBrowsableState.Never)]
743         protected override void ReleaseSwigCPtr(System.Runtime.InteropServices.HandleRef swigCPtr)
744         {
745             Interop.Vector3.delete_Vector3(swigCPtr);
746         }
747
748         private Vector3 Add(Vector3 rhs)
749         {
750             Vector3 ret = new Vector3(Interop.Vector3.Vector3_Add(swigCPtr, Vector3.getCPtr(rhs)), true);
751             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
752             return ret;
753         }
754
755         private Vector3 AddAssign(Vector3 rhs)
756         {
757             Vector3 ret = new Vector3(Interop.Vector3.Vector3_AddAssign(swigCPtr, Vector3.getCPtr(rhs)), false);
758             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
759             return ret;
760         }
761
762         private Vector3 Subtract(Vector3 rhs)
763         {
764             Vector3 ret = new Vector3(Interop.Vector3.Vector3_Subtract__SWIG_0(swigCPtr, Vector3.getCPtr(rhs)), true);
765             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
766             return ret;
767         }
768
769         private Vector3 SubtractAssign(Vector3 rhs)
770         {
771             Vector3 ret = new Vector3(Interop.Vector3.Vector3_SubtractAssign(swigCPtr, Vector3.getCPtr(rhs)), false);
772             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
773             return ret;
774         }
775
776         private Vector3 Multiply(Vector3 rhs)
777         {
778             Vector3 ret = new Vector3(Interop.Vector3.Vector3_Multiply__SWIG_0(swigCPtr, Vector3.getCPtr(rhs)), true);
779             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
780             return ret;
781         }
782
783         private Vector3 Multiply(float rhs)
784         {
785             Vector3 ret = new Vector3(Interop.Vector3.Vector3_Multiply__SWIG_1(swigCPtr, rhs), true);
786             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
787             return ret;
788         }
789
790         private Vector3 MultiplyAssign(Vector3 rhs)
791         {
792             Vector3 ret = new Vector3(Interop.Vector3.Vector3_MultiplyAssign__SWIG_0(swigCPtr, Vector3.getCPtr(rhs)), false);
793             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
794             return ret;
795         }
796
797         private Vector3 MultiplyAssign(float rhs)
798         {
799             Vector3 ret = new Vector3(Interop.Vector3.Vector3_MultiplyAssign__SWIG_1(swigCPtr, rhs), false);
800             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
801             return ret;
802         }
803
804         private Vector3 MultiplyAssign(Rotation rhs)
805         {
806             Vector3 ret = new Vector3(Interop.Vector3.Vector3_MultiplyAssign__SWIG_2(swigCPtr, Rotation.getCPtr(rhs)), false);
807             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
808             return ret;
809         }
810
811         private Vector3 Divide(Vector3 rhs)
812         {
813             Vector3 ret = new Vector3(Interop.Vector3.Vector3_Divide__SWIG_0(swigCPtr, Vector3.getCPtr(rhs)), true);
814             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
815             return ret;
816         }
817
818         private Vector3 Divide(float rhs)
819         {
820             Vector3 ret = new Vector3(Interop.Vector3.Vector3_Divide__SWIG_1(swigCPtr, rhs), true);
821             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
822             return ret;
823         }
824
825         private Vector3 DivideAssign(Vector3 rhs)
826         {
827             Vector3 ret = new Vector3(Interop.Vector3.Vector3_DivideAssign__SWIG_0(swigCPtr, Vector3.getCPtr(rhs)), false);
828             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
829             return ret;
830         }
831
832         private Vector3 DivideAssign(float rhs)
833         {
834             Vector3 ret = new Vector3(Interop.Vector3.Vector3_DivideAssign__SWIG_1(swigCPtr, rhs), false);
835             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
836             return ret;
837         }
838
839         private Vector3 Subtract()
840         {
841             Vector3 ret = new Vector3(Interop.Vector3.Vector3_Subtract__SWIG_1(swigCPtr), true);
842             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
843             return ret;
844         }
845
846         private bool EqualTo(Vector3 rhs)
847         {
848             bool ret = Interop.Vector3.Vector3_EqualTo(swigCPtr, Vector3.getCPtr(rhs));
849             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
850             return ret;
851         }
852
853         private bool NotEqualTo(Vector3 rhs)
854         {
855             bool ret = Interop.Vector3.Vector3_NotEqualTo(swigCPtr, Vector3.getCPtr(rhs));
856             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
857             return ret;
858         }
859
860         private float ValueOfIndex(uint index)
861         {
862             float ret = Interop.Vector3.Vector3_ValueOfIndex__SWIG_0(swigCPtr, index);
863             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
864             return ret;
865         }
866
867         internal float Dot(Vector3 other)
868         {
869             float ret = Interop.Vector3.Vector3_Dot(swigCPtr, Vector3.getCPtr(other));
870             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
871             return ret;
872         }
873
874         internal Vector3 Cross(Vector3 other)
875         {
876             Vector3 ret = new Vector3(Interop.Vector3.Vector3_Cross(swigCPtr, Vector3.getCPtr(other)), true);
877             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
878             return ret;
879         }
880
881     }
882
883 }