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