Follow formatting NUI
[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         /// <since_tizen> 3 </since_tizen>
218         [Obsolete("Please do not use this setter, Deprecated in API8, will be removed in API10. please use new Vector3(...) constructor")]
219         public float X
220         {
221             set
222             {
223                 Tizen.Log.Fatal("NUI", "Please do not use this setter, Deprecated in API8, will be removed in API10. please use new Vector3(...) constructor");
224
225                 Interop.Vector3.Vector3_X_set(swigCPtr, value);
226                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
227
228                 callback?.Invoke(X, Y, Z);
229             }
230             get
231             {
232                 float ret = Interop.Vector3.Vector3_X_get(swigCPtr);
233                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
234                 return ret;
235             }
236         }
237
238         /// <summary>
239         /// The width component.
240         /// </summary>
241         /// <since_tizen> 3 </since_tizen>
242         [Obsolete("Please do not use this setter, Deprecated in API8, will be removed in API10. please use new Vector3(...) constructor")]
243         public float Width
244         {
245             set
246             {
247                 Tizen.Log.Fatal("NUI", "Please do not use this setter, Deprecated in API8, will be removed in API10. please use new Vector3(...) constructor");
248
249                 Interop.Vector3.Vector3_Width_set(swigCPtr, value);
250                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
251
252                 callback?.Invoke(X, Y, Z);
253             }
254             get
255             {
256                 float ret = Interop.Vector3.Vector3_Width_get(swigCPtr);
257                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
258                 return ret;
259             }
260         }
261
262         /// <summary>
263         /// The red component.
264         /// </summary>
265         /// <since_tizen> 3 </since_tizen>
266         [Obsolete("Please do not use this setter, Deprecated in API8, will be removed in API10. please use new Vector3(...) constructor")]
267         public float R
268         {
269             set
270             {
271                 Tizen.Log.Fatal("NUI", "Please do not use this setter, Deprecated in API8, will be removed in API10. please use new Vector3(...) constructor");
272
273                 Interop.Vector3.Vector3_r_set(swigCPtr, value);
274                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
275
276                 callback?.Invoke(X, Y, Z);
277             }
278             get
279             {
280                 float ret = Interop.Vector3.Vector3_r_get(swigCPtr);
281                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
282                 return ret;
283             }
284         }
285
286         /// <summary>
287         /// The y component.
288         /// </summary>
289         /// <since_tizen> 3 </since_tizen>
290         [Obsolete("Please do not use this setter, Deprecated in API8, will be removed in API10. please use new Vector3(...) constructor")]
291         public float Y
292         {
293             set
294             {
295                 Tizen.Log.Fatal("NUI", "Please do not use this setter, Deprecated in API8, will be removed in API10. please use new Vector3(...) constructor");
296
297                 Interop.Vector3.Vector3_Y_set(swigCPtr, value);
298                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
299
300                 callback?.Invoke(X, Y, Z);
301             }
302             get
303             {
304                 float ret = Interop.Vector3.Vector3_Y_get(swigCPtr);
305                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
306                 return ret;
307             }
308         }
309
310         /// <summary>
311         /// The height component.
312         /// </summary>
313         /// <since_tizen> 3 </since_tizen>
314         [Obsolete("Please do not use this setter, Deprecated in API8, will be removed in API10. please use new Vector3(...) constructor")]
315         public float Height
316         {
317             set
318             {
319                 Tizen.Log.Fatal("NUI", "Please do not use this setter, Deprecated in API8, will be removed in API10. please use new Vector3(...) constructor");
320
321                 Interop.Vector3.Vector3_Height_set(swigCPtr, value);
322                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
323
324                 callback?.Invoke(X, Y, Z);
325             }
326             get
327             {
328                 float ret = Interop.Vector3.Vector3_Height_get(swigCPtr);
329                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
330                 return ret;
331             }
332         }
333
334         /// <summary>
335         /// The green component.
336         /// </summary>
337         /// <since_tizen> 3 </since_tizen>
338         [Obsolete("Please do not use this setter, Deprecated in API8, will be removed in API10. please use new Vector3(...) constructor")]
339         public float G
340         {
341             set
342             {
343                 Tizen.Log.Fatal("NUI", "Please do not use this setter, Deprecated in API8, will be removed in API10. please use new Vector3(...) constructor");
344
345                 Interop.Vector3.Vector3_g_set(swigCPtr, value);
346                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
347
348                 callback?.Invoke(X, Y, Z);
349             }
350             get
351             {
352                 float ret = Interop.Vector3.Vector3_g_get(swigCPtr);
353                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
354                 return ret;
355             }
356         }
357
358         /// <summary>
359         /// The z component.
360         /// </summary>
361         /// <since_tizen> 3 </since_tizen>
362         [Obsolete("Please do not use this setter, Deprecated in API8, will be removed in API10. please use new Vector3(...) constructor")]
363         public float Z
364         {
365             set
366             {
367                 Tizen.Log.Fatal("NUI", "Please do not use this setter, Deprecated in API8, will be removed in API10. please use new Vector3(...) constructor");
368
369                 Interop.Vector3.Vector3_Z_set(swigCPtr, value);
370                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
371
372                 callback?.Invoke(X, Y, Z);
373             }
374             get
375             {
376                 float ret = Interop.Vector3.Vector3_Z_get(swigCPtr);
377                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
378                 return ret;
379             }
380         }
381
382         /// <summary>
383         /// The depth component.
384         /// </summary>
385         /// <since_tizen> 3 </since_tizen>
386         [Obsolete("Please do not use this setter, Deprecated in API8, will be removed in API10. please use new Vector3(...) constructor")]
387         public float Depth
388         {
389             set
390             {
391                 Tizen.Log.Fatal("NUI", "Please do not use this setter, Deprecated in API8, will be removed in API10. please use new Vector3(...) constructor");
392
393                 Interop.Vector3.Vector3_Depth_set(swigCPtr, value);
394                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
395
396                 callback?.Invoke(X, Y, Z);
397             }
398             get
399             {
400                 float ret = Interop.Vector3.Vector3_Depth_get(swigCPtr);
401                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
402                 return ret;
403             }
404         }
405
406         /// <summary>
407         /// The blue component.
408         /// </summary>
409         /// <since_tizen> 3 </since_tizen>
410         [Obsolete("Please do not use this setter, Deprecated in API8, will be removed in API10. please use new Vector3(...) constructor")]
411         public float B
412         {
413             set
414             {
415                 Tizen.Log.Fatal("NUI", "Please do not use this setter, Deprecated in API8, will be removed in API10. please use new Vector3(...) constructor");
416
417                 Interop.Vector3.Vector3_b_set(swigCPtr, value);
418                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
419
420                 callback?.Invoke(X, Y, Z);
421             }
422             get
423             {
424                 float ret = Interop.Vector3.Vector3_b_get(swigCPtr);
425                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
426                 return ret;
427             }
428         }
429
430         /// <summary>
431         /// An array subscript operator overload.
432         /// </summary>
433         /// <param name="index">The subscript index.</param>
434         /// <returns>The float at the given index.</returns>
435         /// <since_tizen> 3 </since_tizen>
436         public float this[uint index]
437         {
438             get
439             {
440                 return ValueOfIndex(index);
441             }
442         }
443
444         /// <summary>
445         /// The addition operator.
446         /// </summary>
447         /// <param name="arg1">The first value.</param>
448         /// <param name="arg2">The second value.</param>
449         /// <returns>The vector containing the result of the addition.</returns>
450         /// <since_tizen> 3 </since_tizen>
451         public static Vector3 operator +(Vector3 arg1, Vector3 arg2)
452         {
453             return arg1.Add(arg2);
454         }
455
456         /// <summary>
457         /// The subtraction operator.
458         /// </summary>
459         /// <param name="arg1">The first value.</param>
460         /// <param name="arg2">The second value.</param>
461         /// <returns>The vector containing the result of the subtraction.</returns>
462         /// <since_tizen> 3 </since_tizen>
463         public static Vector3 operator -(Vector3 arg1, Vector3 arg2)
464         {
465             return arg1.Subtract(arg2);
466         }
467
468         /// <summary>
469         /// The unary negation operator.
470         /// </summary>
471         /// <param name="arg1">The target value.</param>
472         /// <returns>The vector containg the negation.</returns>
473         /// <since_tizen> 3 </since_tizen>
474         public static Vector3 operator -(Vector3 arg1)
475         {
476             return arg1.Subtract();
477         }
478
479         /// <summary>
480         /// The multiplication operator.
481         /// </summary>
482         /// <param name="arg1">The first value.</param>
483         /// <param name="arg2">The second value.</param>
484         /// <returns>The vector containing the result of the multiplication.</returns>
485         /// <since_tizen> 3 </since_tizen>
486         public static Vector3 operator *(Vector3 arg1, Vector3 arg2)
487         {
488             return arg1.Multiply(arg2);
489         }
490
491         /// <summary>
492         /// The multiplication operator.
493         /// </summary>
494         /// <param name="arg1">The first value.</param>
495         /// <param name="arg2">The float value to scale the vector.</param>
496         /// <returns>The vector containing the result of the scaling.</returns>
497         /// <since_tizen> 3 </since_tizen>
498         public static Vector3 operator *(Vector3 arg1, float arg2)
499         {
500             return arg1.Multiply(arg2);
501         }
502
503         /// <summary>
504         /// The division operator.
505         /// </summary>
506         /// <param name="arg1">The first value.</param>
507         /// <param name="arg2">The second value.</param>
508         /// <returns>The vector containing the result of the division.</returns>
509         /// <since_tizen> 3 </since_tizen>
510         public static Vector3 operator /(Vector3 arg1, Vector3 arg2)
511         {
512             return arg1.Divide(arg2);
513         }
514
515         /// <summary>
516         /// The division operator.
517         /// </summary>
518         /// <param name="arg1">The first value.</param>
519         /// <param name="arg2">The float value to scale the vector by.</param>
520         /// <returns>The vector containing the result of the scaling.</returns>
521         /// <since_tizen> 3 </since_tizen>
522         public static Vector3 operator /(Vector3 arg1, float arg2)
523         {
524             return arg1.Divide(arg2);
525         }
526
527         /// <summary>
528         /// Determines whether the specified object is equal to the current object.
529         /// </summary>
530         /// <param name="obj">The object to compare with the current object.</param>
531         /// <returns>true if the specified object is equal to the current object; otherwise, false.</returns>
532         public override bool Equals(System.Object obj)
533         {
534             Vector3 vector3 = obj as Vector3;
535             bool equal = false;
536             if (X == vector3?.X && Y == vector3?.Y && Z == vector3?.Z)
537             {
538                 equal = true;
539             }
540             return equal;
541         }
542
543         /// <summary>
544         /// Gets the the hash code of this Vector3.
545         /// </summary>
546         /// <returns>The Hash Code.</returns>
547         /// <since_tizen> 6 </since_tizen>
548         public override int GetHashCode()
549         {
550             return swigCPtr.Handle.GetHashCode();
551         }
552
553         /// <summary>
554         /// Returns the length of the vector.
555         /// </summary>
556         /// <returns>The length of the vector.</returns>
557         /// <since_tizen> 3 </since_tizen>
558         public float Length()
559         {
560             float ret = Interop.Vector3.Vector3_Length(swigCPtr);
561             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
562             return ret;
563         }
564
565         /// <summary>
566         /// Returns the length of the vector squared.<br />
567         /// This is more efficient than Length() for threshold
568         /// testing as it avoids the use of a square root.<br />
569         /// </summary>
570         /// <returns>The length of the vector squared.</returns>
571         /// <since_tizen> 3 </since_tizen>
572         public float LengthSquared()
573         {
574             float ret = Interop.Vector3.Vector3_LengthSquared(swigCPtr);
575             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
576             return ret;
577         }
578
579         /// <summary>
580         /// Sets the vector to be unit length, whilst maintaining its direction.
581         /// </summary>
582         /// <since_tizen> 3 </since_tizen>
583         public void Normalize()
584         {
585             Interop.Vector3.Vector3_Normalize(swigCPtr);
586             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
587         }
588
589         /// <summary>
590         /// Clamps the vector between minimum and maximum vectors.
591         /// </summary>
592         /// <param name="min">The minimum vector.</param>
593         /// <param name="max">The maximum vector.</param>
594         /// <since_tizen> 3 </since_tizen>
595         public void Clamp(Vector3 min, Vector3 max)
596         {
597             Interop.Vector3.Vector3_Clamp(swigCPtr, Vector3.getCPtr(min), Vector3.getCPtr(max));
598             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
599         }
600
601         /// <summary>
602         /// Returns the x and y components (or width and height, or r and g) as a Vector2.
603         /// </summary>
604         /// <returns>The partial vector contents as Vector2 (x,y).</returns>
605         /// <since_tizen> 3 </since_tizen>
606         public Vector2 GetVectorXY()
607         {
608             Vector2 ret = new Vector2(Interop.Vector3.Vector3_GetVectorXY__SWIG_0(swigCPtr), false);
609             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
610             return ret;
611         }
612
613         /// <summary>
614         /// Returns the y and z components (or height and depth, or g and b) as a Vector2.
615         /// </summary>
616         /// <returns>The partial vector contents as Vector2 (y,z).</returns>
617         /// <since_tizen> 3 </since_tizen>
618         public Vector2 GetVectorYZ()
619         {
620             Vector2 ret = new Vector2(Interop.Vector3.Vector3_GetVectorYZ__SWIG_0(swigCPtr), false);
621             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
622             return ret;
623         }
624
625         /// <inheritdoc/>
626         [EditorBrowsable(EditorBrowsableState.Never)]
627         public object Clone() => new Vector3(X, Y, Z);
628
629         internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Vector3 obj)
630         {
631             return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
632         }
633
634         internal static Vector3 GetVector3FromPtr(global::System.IntPtr cPtr)
635         {
636             Vector3 ret = new Vector3(cPtr, false);
637             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
638             return ret;
639         }
640
641         internal SWIGTYPE_p_float AsFloat()
642         {
643             global::System.IntPtr cPtr = Interop.Vector3.Vector3_AsFloat__SWIG_0(swigCPtr);
644             SWIGTYPE_p_float ret = (cPtr == global::System.IntPtr.Zero) ? null : new SWIGTYPE_p_float(cPtr, false);
645             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
646             return ret;
647         }
648
649         /// This will not be public opened.
650         [EditorBrowsable(EditorBrowsableState.Never)]
651         protected override void ReleaseSwigCPtr(System.Runtime.InteropServices.HandleRef swigCPtr)
652         {
653             Interop.Vector3.delete_Vector3(swigCPtr);
654         }
655
656         private Vector3 Add(Vector3 rhs)
657         {
658             Vector3 ret = new Vector3(Interop.Vector3.Vector3_Add(swigCPtr, Vector3.getCPtr(rhs)), true);
659             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
660             return ret;
661         }
662
663         private Vector3 AddAssign(Vector3 rhs)
664         {
665             Vector3 ret = new Vector3(Interop.Vector3.Vector3_AddAssign(swigCPtr, Vector3.getCPtr(rhs)), false);
666             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
667             return ret;
668         }
669
670         private Vector3 Subtract(Vector3 rhs)
671         {
672             Vector3 ret = new Vector3(Interop.Vector3.Vector3_Subtract__SWIG_0(swigCPtr, Vector3.getCPtr(rhs)), true);
673             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
674             return ret;
675         }
676
677         private Vector3 SubtractAssign(Vector3 rhs)
678         {
679             Vector3 ret = new Vector3(Interop.Vector3.Vector3_SubtractAssign(swigCPtr, Vector3.getCPtr(rhs)), false);
680             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
681             return ret;
682         }
683
684         private Vector3 Multiply(Vector3 rhs)
685         {
686             Vector3 ret = new Vector3(Interop.Vector3.Vector3_Multiply__SWIG_0(swigCPtr, Vector3.getCPtr(rhs)), true);
687             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
688             return ret;
689         }
690
691         private Vector3 Multiply(float rhs)
692         {
693             Vector3 ret = new Vector3(Interop.Vector3.Vector3_Multiply__SWIG_1(swigCPtr, rhs), true);
694             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
695             return ret;
696         }
697
698         private Vector3 MultiplyAssign(Vector3 rhs)
699         {
700             Vector3 ret = new Vector3(Interop.Vector3.Vector3_MultiplyAssign__SWIG_0(swigCPtr, Vector3.getCPtr(rhs)), false);
701             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
702             return ret;
703         }
704
705         private Vector3 MultiplyAssign(float rhs)
706         {
707             Vector3 ret = new Vector3(Interop.Vector3.Vector3_MultiplyAssign__SWIG_1(swigCPtr, rhs), false);
708             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
709             return ret;
710         }
711
712         private Vector3 MultiplyAssign(Rotation rhs)
713         {
714             Vector3 ret = new Vector3(Interop.Vector3.Vector3_MultiplyAssign__SWIG_2(swigCPtr, Rotation.getCPtr(rhs)), false);
715             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
716             return ret;
717         }
718
719         private Vector3 Divide(Vector3 rhs)
720         {
721             Vector3 ret = new Vector3(Interop.Vector3.Vector3_Divide__SWIG_0(swigCPtr, Vector3.getCPtr(rhs)), true);
722             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
723             return ret;
724         }
725
726         private Vector3 Divide(float rhs)
727         {
728             Vector3 ret = new Vector3(Interop.Vector3.Vector3_Divide__SWIG_1(swigCPtr, rhs), true);
729             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
730             return ret;
731         }
732
733         private Vector3 DivideAssign(Vector3 rhs)
734         {
735             Vector3 ret = new Vector3(Interop.Vector3.Vector3_DivideAssign__SWIG_0(swigCPtr, Vector3.getCPtr(rhs)), false);
736             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
737             return ret;
738         }
739
740         private Vector3 DivideAssign(float rhs)
741         {
742             Vector3 ret = new Vector3(Interop.Vector3.Vector3_DivideAssign__SWIG_1(swigCPtr, rhs), false);
743             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
744             return ret;
745         }
746
747         private Vector3 Subtract()
748         {
749             Vector3 ret = new Vector3(Interop.Vector3.Vector3_Subtract__SWIG_1(swigCPtr), true);
750             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
751             return ret;
752         }
753
754         private bool EqualTo(Vector3 rhs)
755         {
756             bool ret = Interop.Vector3.Vector3_EqualTo(swigCPtr, Vector3.getCPtr(rhs));
757             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
758             return ret;
759         }
760
761         private bool NotEqualTo(Vector3 rhs)
762         {
763             bool ret = Interop.Vector3.Vector3_NotEqualTo(swigCPtr, Vector3.getCPtr(rhs));
764             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
765             return ret;
766         }
767
768         private float ValueOfIndex(uint index)
769         {
770             float ret = Interop.Vector3.Vector3_ValueOfIndex__SWIG_0(swigCPtr, index);
771             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
772             return ret;
773         }
774
775         internal float Dot(Vector3 other)
776         {
777             float ret = Interop.Vector3.Vector3_Dot(swigCPtr, Vector3.getCPtr(other));
778             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
779             return ret;
780         }
781
782         internal Vector3 Cross(Vector3 other)
783         {
784             Vector3 ret = new Vector3(Interop.Vector3.Vector3_Cross(swigCPtr, Vector3.getCPtr(other)), true);
785             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
786             return ret;
787         }
788
789     }
790
791 }