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