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