Release 4.0.0-preview1-00301
[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
18 namespace Tizen.NUI
19 {
20
21     /// <summary>
22     /// A four-dimensional vector.
23     /// </summary>
24     public class Vector4 : 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 Vector4(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(Vector4 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         ~Vector4()
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_Vector4(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 Vector4 operator +(Vector4 arg1, Vector4 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 Vector4 operator -(Vector4 arg1, Vector4 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 containing the negation.</returns>
151         /// <since_tizen> 3 </since_tizen>
152         public static Vector4 operator -(Vector4 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 Vector4 operator *(Vector4 arg1, Vector4 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 scaling.</returns>
175         /// <since_tizen> 3 </since_tizen>
176         public static Vector4 operator *(Vector4 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 Vector4 operator /(Vector4 arg1, Vector4 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 scaling.</returns>
199         /// <since_tizen> 3 </since_tizen>
200         public static Vector4 operator /(Vector4 arg1, float arg2)
201         {
202             return arg1.Divide(arg2);
203         }
204
205         /// <summary>
206         /// The 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 Vector4 GetVector4FromPtr(global::System.IntPtr cPtr)
220         {
221             Vector4 ret = new Vector4(cPtr, false);
222             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
223             return ret;
224         }
225
226         /// <summary>
227         /// The default constructor initializes the vector to 0.
228         /// </summary>
229         /// <since_tizen> 3 </since_tizen>
230         public Vector4() : this(NDalicPINVOKE.new_Vector4__SWIG_0(), true)
231         {
232             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
233         }
234
235         /// <summary>
236         /// The conversion constructor from four floats.
237         /// </summary>
238         /// <param name="x">The x (or r/s) component.</param>
239         /// <param name="y">The y (or g/t) component.</param>
240         /// <param name="z">The z (or b/p) component.</param>
241         /// <param name="w">The w (or a/q) component.</param>
242         /// <since_tizen> 3 </since_tizen>
243         public Vector4(float x, float y, float z, float w) : this(NDalicPINVOKE.new_Vector4__SWIG_1(x, y, z, w), true)
244         {
245             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
246         }
247
248         /// <summary>
249         /// The conversion constructor from an array of four floats.
250         /// </summary>
251         /// <param name="array">The array of either xyzw/rgba/stpq.</param>
252         /// <since_tizen> 3 </since_tizen>
253         public Vector4(float[] array) : this(NDalicPINVOKE.new_Vector4__SWIG_2(array), true)
254         {
255             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
256         }
257
258         /// <summary>
259         /// The conversion constructor from Vector2.
260         /// </summary>
261         /// <param name="vec2">Vector2 to copy from, z and w are initialized to 0.</param>
262         /// <since_tizen> 3 </since_tizen>
263         public Vector4(Vector2 vec2) : this(NDalicPINVOKE.new_Vector4__SWIG_3(Vector2.getCPtr(vec2)), true)
264         {
265             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
266         }
267
268         /// <summary>
269         /// The conversion constructor from Vector3.
270         /// </summary>
271         /// <param name="vec3">Vector3 to copy from, w is initialized to 0.</param>
272         /// <since_tizen> 3 </since_tizen>
273         public Vector4(Vector3 vec3) : this(NDalicPINVOKE.new_Vector4__SWIG_4(Vector3.getCPtr(vec3)), true)
274         {
275             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
276         }
277
278         /// <summary>
279         /// (1.0f,1.0f,1.0f,1.0f).
280         /// </summary>
281         /// <since_tizen> 3 </since_tizen>
282         public static Vector4 One
283         {
284             get
285             {
286                 global::System.IntPtr cPtr = NDalicPINVOKE.Vector4_ONE_get();
287                 Vector4 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector4(cPtr, false);
288                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
289                 return ret;
290             }
291         }
292
293         /// <summary>
294         /// (1.0f,0.0f,0.0f,0.0f).
295         /// </summary>
296         /// <since_tizen> 3 </since_tizen>
297         public static Vector4 XAxis
298         {
299             get
300             {
301                 global::System.IntPtr cPtr = NDalicPINVOKE.Vector4_XAXIS_get();
302                 Vector4 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector4(cPtr, false);
303                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
304                 return ret;
305             }
306         }
307
308         /// <summary>
309         /// (0.0f,1.0f,0.0f,0.0f).
310         /// </summary>
311         /// <since_tizen> 3 </since_tizen>
312         public static Vector4 YAxis
313         {
314             get
315             {
316                 global::System.IntPtr cPtr = NDalicPINVOKE.Vector4_YAXIS_get();
317                 Vector4 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector4(cPtr, false);
318                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
319                 return ret;
320             }
321         }
322
323         /// <summary>
324         /// (0.0f,0.0f,1.0f,0.0f).
325         /// </summary>
326         /// <since_tizen> 3 </since_tizen>
327         public static Vector4 ZAxis
328         {
329             get
330             {
331                 global::System.IntPtr cPtr = NDalicPINVOKE.Vector4_ZAXIS_get();
332                 Vector4 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector4(cPtr, false);
333                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
334                 return ret;
335             }
336         }
337
338         /// <summary>
339         /// (0.0f, 0.0f, 0.0f, 0.0f).
340         /// </summary>
341         /// <since_tizen> 3 </since_tizen>
342         public static Vector4 Zero
343         {
344             get
345             {
346                 global::System.IntPtr cPtr = NDalicPINVOKE.Vector4_ZERO_get();
347                 Vector4 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector4(cPtr, false);
348                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
349                 return ret;
350             }
351         }
352
353         private Vector4 Add(Vector4 rhs)
354         {
355             Vector4 ret = new Vector4(NDalicPINVOKE.Vector4_Add(swigCPtr, Vector4.getCPtr(rhs)), true);
356             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
357             return ret;
358         }
359
360         private Vector4 AddAssign(Vector4 rhs)
361         {
362             Vector4 ret = new Vector4(NDalicPINVOKE.Vector4_AddAssign(swigCPtr, Vector4.getCPtr(rhs)), false);
363             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
364             return ret;
365         }
366
367         private Vector4 Subtract(Vector4 rhs)
368         {
369             Vector4 ret = new Vector4(NDalicPINVOKE.Vector4_Subtract__SWIG_0(swigCPtr, Vector4.getCPtr(rhs)), true);
370             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
371             return ret;
372         }
373
374         private Vector4 SubtractAssign(Vector4 rhs)
375         {
376             Vector4 ret = new Vector4(NDalicPINVOKE.Vector4_SubtractAssign(swigCPtr, Vector4.getCPtr(rhs)), false);
377             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
378             return ret;
379         }
380
381         private Vector4 Multiply(Vector4 rhs)
382         {
383             Vector4 ret = new Vector4(NDalicPINVOKE.Vector4_Multiply__SWIG_0(swigCPtr, Vector4.getCPtr(rhs)), true);
384             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
385             return ret;
386         }
387
388         private Vector4 Multiply(float rhs)
389         {
390             Vector4 ret = new Vector4(NDalicPINVOKE.Vector4_Multiply__SWIG_1(swigCPtr, rhs), true);
391             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
392             return ret;
393         }
394
395         private Vector4 MultiplyAssign(Vector4 rhs)
396         {
397             Vector4 ret = new Vector4(NDalicPINVOKE.Vector4_MultiplyAssign__SWIG_0(swigCPtr, Vector4.getCPtr(rhs)), false);
398             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
399             return ret;
400         }
401
402         private Vector4 MultiplyAssign(float rhs)
403         {
404             Vector4 ret = new Vector4(NDalicPINVOKE.Vector4_MultiplyAssign__SWIG_1(swigCPtr, rhs), false);
405             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
406             return ret;
407         }
408
409         private Vector4 Divide(Vector4 rhs)
410         {
411             Vector4 ret = new Vector4(NDalicPINVOKE.Vector4_Divide__SWIG_0(swigCPtr, Vector4.getCPtr(rhs)), true);
412             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
413             return ret;
414         }
415
416         private Vector4 Divide(float rhs)
417         {
418             Vector4 ret = new Vector4(NDalicPINVOKE.Vector4_Divide__SWIG_1(swigCPtr, rhs), true);
419             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
420             return ret;
421         }
422
423         private Vector4 DivideAssign(Vector4 rhs)
424         {
425             Vector4 ret = new Vector4(NDalicPINVOKE.Vector4_DivideAssign__SWIG_0(swigCPtr, Vector4.getCPtr(rhs)), false);
426             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
427             return ret;
428         }
429
430         private Vector4 DivideAssign(float rhs)
431         {
432             Vector4 ret = new Vector4(NDalicPINVOKE.Vector4_DivideAssign__SWIG_1(swigCPtr, rhs), false);
433             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
434             return ret;
435         }
436
437         private Vector4 Subtract()
438         {
439             Vector4 ret = new Vector4(NDalicPINVOKE.Vector4_Subtract__SWIG_1(swigCPtr), true);
440             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
441             return ret;
442         }
443
444         private bool EqualTo(Vector4 rhs)
445         {
446             bool ret = NDalicPINVOKE.Vector4_EqualTo(swigCPtr, Vector4.getCPtr(rhs));
447             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
448             return ret;
449         }
450
451         private bool NotEqualTo(Vector4 rhs)
452         {
453             bool ret = NDalicPINVOKE.Vector4_NotEqualTo(swigCPtr, Vector4.getCPtr(rhs));
454             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
455             return ret;
456         }
457
458         private float ValueOfIndex(uint index)
459         {
460             float ret = NDalicPINVOKE.Vector4_ValueOfIndex__SWIG_0(swigCPtr, index);
461             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
462             return ret;
463         }
464
465         internal float Dot(Vector3 other)
466         {
467             float ret = NDalicPINVOKE.Vector4_Dot__SWIG_0(swigCPtr, Vector3.getCPtr(other));
468             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
469             return ret;
470         }
471
472         internal float Dot(Vector4 other)
473         {
474             float ret = NDalicPINVOKE.Vector4_Dot__SWIG_1(swigCPtr, Vector4.getCPtr(other));
475             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
476             return ret;
477         }
478
479         internal float Dot4(Vector4 other)
480         {
481             float ret = NDalicPINVOKE.Vector4_Dot4(swigCPtr, Vector4.getCPtr(other));
482             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
483             return ret;
484         }
485
486         internal Vector4 Cross(Vector4 other)
487         {
488             Vector4 ret = new Vector4(NDalicPINVOKE.Vector4_Cross(swigCPtr, Vector4.getCPtr(other)), true);
489             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
490             return ret;
491         }
492
493         /// <summary>
494         /// Returns the length of the vector.
495         /// </summary>
496         /// <returns>The length.</returns>
497         /// <since_tizen> 3 </since_tizen>
498         public float Length()
499         {
500             float ret = NDalicPINVOKE.Vector4_Length(swigCPtr);
501             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
502             return ret;
503         }
504
505         /// <summary>
506         /// Returns the length of the vector squared.<br />
507         /// This is faster than using Length() when performing
508         /// threshold checks as it avoids use of the square root.<br />
509         /// </summary>
510         /// <returns>The length of the vector squared.</returns>
511         /// <since_tizen> 3 </since_tizen>
512         public float LengthSquared()
513         {
514             float ret = NDalicPINVOKE.Vector4_LengthSquared(swigCPtr);
515             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
516             return ret;
517         }
518
519         /// <summary>
520         /// Normalizes the vector.<br />
521         /// Sets the vector to unit length whilst maintaining its direction.<br />
522         /// </summary>
523         /// <since_tizen> 3 </since_tizen>
524         public void Normalize()
525         {
526             NDalicPINVOKE.Vector4_Normalize(swigCPtr);
527             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
528         }
529
530         /// <summary>
531         /// Clamps the vector between minimum and maximum vectors.
532         /// </summary>
533         /// <param name="min">The minimum vector.</param>
534         /// <param name="max">The maximum vector.</param>
535         /// <since_tizen> 3 </since_tizen>
536         public void Clamp(Vector4 min, Vector4 max)
537         {
538             NDalicPINVOKE.Vector4_Clamp(swigCPtr, Vector4.getCPtr(min), Vector4.getCPtr(max));
539             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
540         }
541
542         internal SWIGTYPE_p_float AsFloat()
543         {
544             global::System.IntPtr cPtr = NDalicPINVOKE.Vector4_AsFloat__SWIG_0(swigCPtr);
545             SWIGTYPE_p_float ret = (cPtr == global::System.IntPtr.Zero) ? null : new SWIGTYPE_p_float(cPtr, false);
546             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
547             return ret;
548         }
549
550         /// <summary>
551         /// The x component.
552         /// </summary>
553         /// <since_tizen> 3 </since_tizen>
554         public float X
555         {
556             set
557             {
558                 NDalicPINVOKE.Vector4_X_set(swigCPtr, value);
559                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
560             }
561             get
562             {
563                 float ret = NDalicPINVOKE.Vector4_X_get(swigCPtr);
564                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
565                 return ret;
566             }
567         }
568
569         /// <summary>
570         /// The red component.
571         /// </summary>
572         /// <since_tizen> 3 </since_tizen>
573         public float R
574         {
575             set
576             {
577                 NDalicPINVOKE.Vector4_r_set(swigCPtr, value);
578                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
579             }
580             get
581             {
582                 float ret = NDalicPINVOKE.Vector4_r_get(swigCPtr);
583                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
584                 return ret;
585             }
586         }
587
588         /// <summary>
589         /// The s component.
590         /// </summary>
591         /// <since_tizen> 3 </since_tizen>
592         public float S
593         {
594             set
595             {
596                 NDalicPINVOKE.Vector4_s_set(swigCPtr, value);
597                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
598             }
599             get
600             {
601                 float ret = NDalicPINVOKE.Vector4_s_get(swigCPtr);
602                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
603                 return ret;
604             }
605         }
606
607         /// <summary>
608         /// The y component.
609         /// </summary>
610         /// <since_tizen> 3 </since_tizen>
611         public float Y
612         {
613             set
614             {
615                 NDalicPINVOKE.Vector4_Y_set(swigCPtr, value);
616                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
617             }
618             get
619             {
620                 float ret = NDalicPINVOKE.Vector4_Y_get(swigCPtr);
621                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
622                 return ret;
623             }
624         }
625
626         /// <summary>
627         /// The green component.
628         /// </summary>
629         /// <since_tizen> 3 </since_tizen>
630         public float G
631         {
632             set
633             {
634                 NDalicPINVOKE.Vector4_g_set(swigCPtr, value);
635                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
636             }
637             get
638             {
639                 float ret = NDalicPINVOKE.Vector4_g_get(swigCPtr);
640                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
641                 return ret;
642             }
643         }
644
645         /// <summary>
646         /// The t component.
647         /// </summary>
648         /// <since_tizen> 3 </since_tizen>
649         public float T
650         {
651             set
652             {
653                 NDalicPINVOKE.Vector4_t_set(swigCPtr, value);
654                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
655             }
656             get
657             {
658                 float ret = NDalicPINVOKE.Vector4_t_get(swigCPtr);
659                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
660                 return ret;
661             }
662         }
663
664         /// <summary>
665         /// The z component.
666         /// </summary>
667         /// <since_tizen> 3 </since_tizen>
668         public float Z
669         {
670             set
671             {
672                 NDalicPINVOKE.Vector4_Z_set(swigCPtr, value);
673                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
674             }
675             get
676             {
677                 float ret = NDalicPINVOKE.Vector4_Z_get(swigCPtr);
678                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
679                 return ret;
680             }
681         }
682
683         /// <summary>
684         /// The blue component.
685         /// </summary>
686         /// <since_tizen> 3 </since_tizen>
687         public float B
688         {
689             set
690             {
691                 NDalicPINVOKE.Vector4_b_set(swigCPtr, value);
692                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
693             }
694             get
695             {
696                 float ret = NDalicPINVOKE.Vector4_b_get(swigCPtr);
697                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
698                 return ret;
699             }
700         }
701
702         /// <summary>
703         /// The p component.
704         /// </summary>
705         /// <since_tizen> 3 </since_tizen>
706         public float P
707         {
708             set
709             {
710                 NDalicPINVOKE.Vector4_p_set(swigCPtr, value);
711                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
712             }
713             get
714             {
715                 float ret = NDalicPINVOKE.Vector4_p_get(swigCPtr);
716                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
717                 return ret;
718             }
719         }
720
721         /// <summary>
722         /// The w component.
723         /// </summary>
724         /// <since_tizen> 3 </since_tizen>
725         public float W
726         {
727             set
728             {
729                 NDalicPINVOKE.Vector4_W_set(swigCPtr, value);
730                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
731             }
732             get
733             {
734                 float ret = NDalicPINVOKE.Vector4_W_get(swigCPtr);
735                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
736                 return ret;
737             }
738         }
739
740         /// <summary>
741         /// The alpha component.
742         /// </summary>
743         /// <since_tizen> 3 </since_tizen>
744         public float A
745         {
746             set
747             {
748                 NDalicPINVOKE.Vector4_a_set(swigCPtr, value);
749                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
750             }
751             get
752             {
753                 float ret = NDalicPINVOKE.Vector4_a_get(swigCPtr);
754                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
755                 return ret;
756             }
757         }
758
759         /// <summary>
760         /// The q component.
761         /// </summary>
762         /// <since_tizen> 3 </since_tizen>
763         public float Q
764         {
765             set
766             {
767                 NDalicPINVOKE.Vector4_q_set(swigCPtr, value);
768                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
769             }
770             get
771             {
772                 float ret = NDalicPINVOKE.Vector4_q_get(swigCPtr);
773                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
774                 return ret;
775             }
776         }
777
778     }
779
780 }