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