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