Release 4.0.0-preview1-00051
[platform/core/csapi/tizenfx.git] / src / Tizen.NUI / src / public / Vector4.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 four dimensional vector.
22     /// </summary>
23     public class Vector4 : global::System.IDisposable
24     {
25         private global::System.Runtime.InteropServices.HandleRef swigCPtr;
26         protected bool swigCMemOwn;
27
28         internal Vector4(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(Vector4 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         ~Vector4()
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_Vector4(swigCPtr);
96                 }
97                 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
98             }
99             disposed = true;
100         }
101
102         /// <summary>
103         /// Addition operator.
104         /// </summary>
105         /// <param name="arg1">First value</param>
106         /// <param name="arg2">Second value</param>
107         /// <returns>A vector containing the result of the addition</returns>
108         public static Vector4 operator +(Vector4 arg1, Vector4 arg2)
109         {
110             return arg1.Add(arg2);
111         }
112
113         /// <summary>
114         /// Subtraction operator.
115         /// </summary>
116         /// <param name="arg1">First value</param>
117         /// <param name="arg2">Second value</param>
118         /// <returns>A vector containing the result of the subtraction</returns>
119         public static Vector4 operator -(Vector4 arg1, Vector4 arg2)
120         {
121             return arg1.Subtract(arg2);
122         }
123
124         /// <summary>
125         /// Unary negation operator.
126         /// </summary>
127         /// <param name="arg1">Target Value</param>
128         /// <returns>A vector containg the negation</returns>
129         public static Vector4 operator -(Vector4 arg1)
130         {
131             return arg1.Subtract();
132         }
133
134         /// <summary>
135         /// Multiplication operator.
136         /// </summary>
137         /// <param name="arg1">First Value</param>
138         /// <param name="arg2">Second Value</param>
139         /// <returns>A vector containing the result of the multiplication</returns>
140         public static Vector4 operator *(Vector4 arg1, Vector4 arg2)
141         {
142             return arg1.Multiply(arg2);
143         }
144
145         /// <summary>
146         /// Multiplication operator.
147         /// </summary>
148         /// <param name="arg1">First Value</param>
149         /// <param name="arg2">The float value to scale the vector</param>
150         /// <returns>A vector containing the result of the scaling</returns>
151         public static Vector4 operator *(Vector4 arg1, float arg2)
152         {
153             return arg1.Multiply(arg2);
154         }
155
156         /// <summary>
157         /// Division operator.
158         /// </summary>
159         /// <param name="arg1">First Value</param>
160         /// <param name="arg2">Second Value</param>
161         /// <returns>A vector containing the result of the division</returns>
162         public static Vector4 operator /(Vector4 arg1, Vector4 arg2)
163         {
164             return arg1.Divide(arg2);
165         }
166
167         /// <summary>
168         /// Division operator.
169         /// </summary>
170         /// <param name="arg1">First Value</param>
171         /// <param name="arg2">The float value to scale the vector by</param>
172         /// <returns>A vector containing the result of the scaling</returns>
173         public static Vector4 operator /(Vector4 arg1, float arg2)
174         {
175             return arg1.Divide(arg2);
176         }
177
178         /// <summary>
179         /// Array subscript operator overload.
180         /// </summary>
181         /// <param name="index">Subscript index</param>
182         /// <returns>The float at the given index</returns>
183         public float this[uint index]
184         {
185             get
186             {
187                 return ValueOfIndex(index);
188             }
189         }
190
191         internal static Vector4 GetVector4FromPtr(global::System.IntPtr cPtr)
192         {
193             Vector4 ret = new Vector4(cPtr, false);
194             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
195             return ret;
196         }
197
198         /// <summary>
199         /// Default constructor, initializes the vector to 0.
200         /// </summary>
201         public Vector4() : this(NDalicPINVOKE.new_Vector4__SWIG_0(), true)
202         {
203             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
204         }
205
206         /// <summary>
207         /// Conversion constructor from four floats.
208         /// </summary>
209         /// <param name="x">x (or r/s) component</param>
210         /// <param name="y">y (or g/t) component</param>
211         /// <param name="z">z (or b/p) component</param>
212         /// <param name="w">w (or a/q) component</param>
213         public Vector4(float x, float y, float z, float w) : this(NDalicPINVOKE.new_Vector4__SWIG_1(x, y, z, w), true)
214         {
215             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
216         }
217
218         /// <summary>
219         /// Conversion constructor from an array of four floats.
220         /// </summary>
221         /// <param name="array">array Array of either xyzw/rgba/stpq</param>
222         public Vector4(float[] array) : this(NDalicPINVOKE.new_Vector4__SWIG_2(array), true)
223         {
224             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
225         }
226
227         /// <summary>
228         /// Conversion constructor from Vector2.
229         /// </summary>
230         /// <param name="vec2">Vector2 to copy from, z and w are initialized to 0</param>
231         public Vector4(Vector2 vec2) : this(NDalicPINVOKE.new_Vector4__SWIG_3(Vector2.getCPtr(vec2)), true)
232         {
233             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
234         }
235
236         /// <summary>
237         /// Conversion constructor from Vector3.
238         /// </summary>
239         /// <param name="vec3">Vector3 to copy from, w is initialized to 0</param>
240         public Vector4(Vector3 vec3) : this(NDalicPINVOKE.new_Vector4__SWIG_4(Vector3.getCPtr(vec3)), true)
241         {
242             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
243         }
244
245         /// <summary>
246         /// (1.0f,1.0f,1.0f,1.0f)
247         /// </summary>
248         public static Vector4 One
249         {
250             get
251             {
252                 global::System.IntPtr cPtr = NDalicPINVOKE.Vector4_ONE_get();
253                 Vector4 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector4(cPtr, false);
254                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
255                 return ret;
256             }
257         }
258
259         /// <summary>
260         /// (1.0f,0.0f,0.0f,0.0f)
261         /// </summary>
262         public static Vector4 XAxis
263         {
264             get
265             {
266                 global::System.IntPtr cPtr = NDalicPINVOKE.Vector4_XAXIS_get();
267                 Vector4 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector4(cPtr, false);
268                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
269                 return ret;
270             }
271         }
272
273         /// <summary>
274         /// (0.0f,1.0f,0.0f,0.0f)
275         /// </summary>
276         public static Vector4 YAxis
277         {
278             get
279             {
280                 global::System.IntPtr cPtr = NDalicPINVOKE.Vector4_YAXIS_get();
281                 Vector4 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector4(cPtr, false);
282                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
283                 return ret;
284             }
285         }
286
287         /// <summary>
288         /// (0.0f,0.0f,1.0f,0.0f)
289         /// </summary>
290         public static Vector4 ZAxis
291         {
292             get
293             {
294                 global::System.IntPtr cPtr = NDalicPINVOKE.Vector4_ZAXIS_get();
295                 Vector4 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector4(cPtr, false);
296                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
297                 return ret;
298             }
299         }
300
301         /// <summary>
302         /// (0.0f, 0.0f, 0.0f, 0.0f)
303         /// </summary>
304         public static Vector4 Zero
305         {
306             get
307             {
308                 global::System.IntPtr cPtr = NDalicPINVOKE.Vector4_ZERO_get();
309                 Vector4 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector4(cPtr, false);
310                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
311                 return ret;
312             }
313         }
314
315         private Vector4 Add(Vector4 rhs)
316         {
317             Vector4 ret = new Vector4(NDalicPINVOKE.Vector4_Add(swigCPtr, Vector4.getCPtr(rhs)), true);
318             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
319             return ret;
320         }
321
322         private Vector4 AddAssign(Vector4 rhs)
323         {
324             Vector4 ret = new Vector4(NDalicPINVOKE.Vector4_AddAssign(swigCPtr, Vector4.getCPtr(rhs)), false);
325             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
326             return ret;
327         }
328
329         private Vector4 Subtract(Vector4 rhs)
330         {
331             Vector4 ret = new Vector4(NDalicPINVOKE.Vector4_Subtract__SWIG_0(swigCPtr, Vector4.getCPtr(rhs)), true);
332             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
333             return ret;
334         }
335
336         private Vector4 SubtractAssign(Vector4 rhs)
337         {
338             Vector4 ret = new Vector4(NDalicPINVOKE.Vector4_SubtractAssign(swigCPtr, Vector4.getCPtr(rhs)), false);
339             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
340             return ret;
341         }
342
343         private Vector4 Multiply(Vector4 rhs)
344         {
345             Vector4 ret = new Vector4(NDalicPINVOKE.Vector4_Multiply__SWIG_0(swigCPtr, Vector4.getCPtr(rhs)), true);
346             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
347             return ret;
348         }
349
350         private Vector4 Multiply(float rhs)
351         {
352             Vector4 ret = new Vector4(NDalicPINVOKE.Vector4_Multiply__SWIG_1(swigCPtr, rhs), true);
353             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
354             return ret;
355         }
356
357         private Vector4 MultiplyAssign(Vector4 rhs)
358         {
359             Vector4 ret = new Vector4(NDalicPINVOKE.Vector4_MultiplyAssign__SWIG_0(swigCPtr, Vector4.getCPtr(rhs)), false);
360             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
361             return ret;
362         }
363
364         private Vector4 MultiplyAssign(float rhs)
365         {
366             Vector4 ret = new Vector4(NDalicPINVOKE.Vector4_MultiplyAssign__SWIG_1(swigCPtr, rhs), false);
367             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
368             return ret;
369         }
370
371         private Vector4 Divide(Vector4 rhs)
372         {
373             Vector4 ret = new Vector4(NDalicPINVOKE.Vector4_Divide__SWIG_0(swigCPtr, Vector4.getCPtr(rhs)), true);
374             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
375             return ret;
376         }
377
378         private Vector4 Divide(float rhs)
379         {
380             Vector4 ret = new Vector4(NDalicPINVOKE.Vector4_Divide__SWIG_1(swigCPtr, rhs), true);
381             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
382             return ret;
383         }
384
385         private Vector4 DivideAssign(Vector4 rhs)
386         {
387             Vector4 ret = new Vector4(NDalicPINVOKE.Vector4_DivideAssign__SWIG_0(swigCPtr, Vector4.getCPtr(rhs)), false);
388             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
389             return ret;
390         }
391
392         private Vector4 DivideAssign(float rhs)
393         {
394             Vector4 ret = new Vector4(NDalicPINVOKE.Vector4_DivideAssign__SWIG_1(swigCPtr, rhs), false);
395             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
396             return ret;
397         }
398
399         private Vector4 Subtract()
400         {
401             Vector4 ret = new Vector4(NDalicPINVOKE.Vector4_Subtract__SWIG_1(swigCPtr), true);
402             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
403             return ret;
404         }
405
406         private bool EqualTo(Vector4 rhs)
407         {
408             bool ret = NDalicPINVOKE.Vector4_EqualTo(swigCPtr, Vector4.getCPtr(rhs));
409             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
410             return ret;
411         }
412
413         private bool NotEqualTo(Vector4 rhs)
414         {
415             bool ret = NDalicPINVOKE.Vector4_NotEqualTo(swigCPtr, Vector4.getCPtr(rhs));
416             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
417             return ret;
418         }
419
420         private float ValueOfIndex(uint index)
421         {
422             float ret = NDalicPINVOKE.Vector4_ValueOfIndex__SWIG_0(swigCPtr, index);
423             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
424             return ret;
425         }
426
427         internal float Dot(Vector3 other)
428         {
429             float ret = NDalicPINVOKE.Vector4_Dot__SWIG_0(swigCPtr, Vector3.getCPtr(other));
430             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
431             return ret;
432         }
433
434         internal float Dot(Vector4 other)
435         {
436             float ret = NDalicPINVOKE.Vector4_Dot__SWIG_1(swigCPtr, Vector4.getCPtr(other));
437             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
438             return ret;
439         }
440
441         internal float Dot4(Vector4 other)
442         {
443             float ret = NDalicPINVOKE.Vector4_Dot4(swigCPtr, Vector4.getCPtr(other));
444             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
445             return ret;
446         }
447
448         internal Vector4 Cross(Vector4 other)
449         {
450             Vector4 ret = new Vector4(NDalicPINVOKE.Vector4_Cross(swigCPtr, Vector4.getCPtr(other)), true);
451             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
452             return ret;
453         }
454
455         /// <summary>
456         /// Returns the length of the vector.
457         /// </summary>
458         /// <returns>The length</returns>
459         public float Length()
460         {
461             float ret = NDalicPINVOKE.Vector4_Length(swigCPtr);
462             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
463             return ret;
464         }
465
466         /// <summary>
467         /// Returns the length of the vector squared.<br>
468         /// This is faster than using Length() when performing
469         /// threshold checks as it avoids use of the square root.<br>
470         /// </summary>
471         /// <returns>The length of the vector squared</returns>
472         public float LengthSquared()
473         {
474             float ret = NDalicPINVOKE.Vector4_LengthSquared(swigCPtr);
475             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
476             return ret;
477         }
478
479         /// <summary>
480         /// Normalizes the vector.<br>
481         /// Sets the vector to unit length whilst maintaining its direction.<br>
482         /// </summary>
483         public void Normalize()
484         {
485             NDalicPINVOKE.Vector4_Normalize(swigCPtr);
486             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
487         }
488
489         /// <summary>
490         /// Clamps the vector between minimum and maximum vectors.
491         /// </summary>
492         /// <param name="min">The minimum vector</param>
493         /// <param name="max">The maximum vector</param>
494         public void Clamp(Vector4 min, Vector4 max)
495         {
496             NDalicPINVOKE.Vector4_Clamp(swigCPtr, Vector4.getCPtr(min), Vector4.getCPtr(max));
497             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
498         }
499
500         internal SWIGTYPE_p_float AsFloat()
501         {
502             global::System.IntPtr cPtr = NDalicPINVOKE.Vector4_AsFloat__SWIG_0(swigCPtr);
503             SWIGTYPE_p_float ret = (cPtr == global::System.IntPtr.Zero) ? null : new SWIGTYPE_p_float(cPtr, false);
504             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
505             return ret;
506         }
507
508         /// <summary>
509         /// x component
510         /// </summary>
511         public float X
512         {
513             set
514             {
515                 NDalicPINVOKE.Vector4_X_set(swigCPtr, value);
516                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
517             }
518             get
519             {
520                 float ret = NDalicPINVOKE.Vector4_X_get(swigCPtr);
521                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
522                 return ret;
523             }
524         }
525
526         /// <summary>
527         /// red component
528         /// </summary>
529         public float R
530         {
531             set
532             {
533                 NDalicPINVOKE.Vector4_r_set(swigCPtr, value);
534                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
535             }
536             get
537             {
538                 float ret = NDalicPINVOKE.Vector4_r_get(swigCPtr);
539                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
540                 return ret;
541             }
542         }
543
544         /// <summary>
545         /// s component
546         /// </summary>
547         public float S
548         {
549             set
550             {
551                 NDalicPINVOKE.Vector4_s_set(swigCPtr, value);
552                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
553             }
554             get
555             {
556                 float ret = NDalicPINVOKE.Vector4_s_get(swigCPtr);
557                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
558                 return ret;
559             }
560         }
561
562         /// <summary>
563         /// y component
564         /// </summary>
565         public float Y
566         {
567             set
568             {
569                 NDalicPINVOKE.Vector4_Y_set(swigCPtr, value);
570                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
571             }
572             get
573             {
574                 float ret = NDalicPINVOKE.Vector4_Y_get(swigCPtr);
575                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
576                 return ret;
577             }
578         }
579
580         /// <summary>
581         /// green component
582         /// </summary>
583         public float G
584         {
585             set
586             {
587                 NDalicPINVOKE.Vector4_g_set(swigCPtr, value);
588                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
589             }
590             get
591             {
592                 float ret = NDalicPINVOKE.Vector4_g_get(swigCPtr);
593                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
594                 return ret;
595             }
596         }
597
598         /// <summary>
599         /// t component
600         /// </summary>
601         public float T
602         {
603             set
604             {
605                 NDalicPINVOKE.Vector4_t_set(swigCPtr, value);
606                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
607             }
608             get
609             {
610                 float ret = NDalicPINVOKE.Vector4_t_get(swigCPtr);
611                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
612                 return ret;
613             }
614         }
615
616         /// <summary>
617         /// z component
618         /// </summary>
619         public float Z
620         {
621             set
622             {
623                 NDalicPINVOKE.Vector4_Z_set(swigCPtr, value);
624                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
625             }
626             get
627             {
628                 float ret = NDalicPINVOKE.Vector4_Z_get(swigCPtr);
629                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
630                 return ret;
631             }
632         }
633
634         /// <summary>
635         /// blue component
636         /// </summary>
637         public float B
638         {
639             set
640             {
641                 NDalicPINVOKE.Vector4_b_set(swigCPtr, value);
642                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
643             }
644             get
645             {
646                 float ret = NDalicPINVOKE.Vector4_b_get(swigCPtr);
647                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
648                 return ret;
649             }
650         }
651
652         /// <summary>
653         /// p component
654         /// </summary>
655         public float P
656         {
657             set
658             {
659                 NDalicPINVOKE.Vector4_p_set(swigCPtr, value);
660                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
661             }
662             get
663             {
664                 float ret = NDalicPINVOKE.Vector4_p_get(swigCPtr);
665                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
666                 return ret;
667             }
668         }
669
670         /// <summary>
671         /// w component
672         /// </summary>
673         public float W
674         {
675             set
676             {
677                 NDalicPINVOKE.Vector4_W_set(swigCPtr, value);
678                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
679             }
680             get
681             {
682                 float ret = NDalicPINVOKE.Vector4_W_get(swigCPtr);
683                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
684                 return ret;
685             }
686         }
687
688         /// <summary>
689         /// alpha component
690         /// </summary>
691         public float A
692         {
693             set
694             {
695                 NDalicPINVOKE.Vector4_a_set(swigCPtr, value);
696                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
697             }
698             get
699             {
700                 float ret = NDalicPINVOKE.Vector4_a_get(swigCPtr);
701                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
702                 return ret;
703             }
704         }
705
706         /// <summary>
707         /// q component
708         /// </summary>
709         public float Q
710         {
711             set
712             {
713                 NDalicPINVOKE.Vector4_q_set(swigCPtr, value);
714                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
715             }
716             get
717             {
718                 float ret = NDalicPINVOKE.Vector4_q_get(swigCPtr);
719                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
720                 return ret;
721             }
722         }
723
724     }
725
726 }