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