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