1 // Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
\r
2 // PROPRIETARY/CONFIDENTIAL
\r
3 // This software is the confidential and proprietary
\r
4 // information of SAMSUNG ELECTRONICS ("Confidential Information"). You shall
\r
5 // not disclose such Confidential Information and shall use it only in
\r
6 // accordance with the terms of the license agreement you entered into with
\r
7 // SAMSUNG ELECTRONICS. SAMSUNG make no representations or warranties about the
\r
8 // suitability of the software, either express or implied, including but not
\r
9 // limited to the implied warranties of merchantability, fitness for a
\r
10 // particular purpose, or non-infringement. SAMSUNG shall not be liable for any
\r
11 // damages suffered by licensee as a result of using, modifying or distributing
\r
12 // this software or its derivatives.
\r
14 // Copyright (c) 2017 Samsung Electronics Co., Ltd.
\r
16 // Licensed under the Apache License, Version 2.0 (the "License");
\r
17 // you may not use this file except in compliance with the License.
\r
18 // You may obtain a copy of the License at
\r
20 // http://www.apache.org/licenses/LICENSE-2.0
\r
22 // Unless required by applicable law or agreed to in writing, software
\r
23 // distributed under the License is distributed on an "AS IS" BASIS,
\r
24 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
\r
25 // See the License for the specific language governing permissions and
\r
26 // limitations under the License.
\r
29 // This File has been auto-generated by SWIG and then modified using DALi Ruby Scripts
\r
30 // Some have been manually changed
\r
36 public class Vector3 : global::System.IDisposable
\r
38 private global::System.Runtime.InteropServices.HandleRef swigCPtr;
\r
39 protected bool swigCMemOwn;
\r
41 internal Vector3(global::System.IntPtr cPtr, bool cMemoryOwn)
\r
43 swigCMemOwn = cMemoryOwn;
\r
44 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
\r
47 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Vector3 obj)
\r
49 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
\r
54 DisposeQueue.Instance.Add(this);
\r
57 public virtual void Dispose()
\r
59 if (!Stage.IsInstalled())
\r
61 DisposeQueue.Instance.Add(this);
\r
67 if (swigCPtr.Handle != global::System.IntPtr.Zero)
\r
71 swigCMemOwn = false;
\r
72 NDalicPINVOKE.delete_Vector3(swigCPtr);
\r
74 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
\r
76 global::System.GC.SuppressFinalize(this);
\r
81 public static Vector3 operator +(Vector3 arg1, Vector3 arg2)
\r
83 return arg1.Add(arg2);
\r
86 public static Vector3 operator -(Vector3 arg1, Vector3 arg2)
\r
88 return arg1.Subtract(arg2);
\r
91 public static Vector3 operator -(Vector3 arg1)
\r
93 return arg1.Subtract();
\r
96 public static Vector3 operator *(Vector3 arg1, Vector3 arg2)
\r
98 return arg1.Multiply(arg2);
\r
101 public static Vector3 operator *(Vector3 arg1, float arg2)
\r
103 return arg1.Multiply(arg2);
\r
106 public static Vector3 operator /(Vector3 arg1, Vector3 arg2)
\r
108 return arg1.Divide(arg2);
\r
111 public static Vector3 operator /(Vector3 arg1, float arg2)
\r
113 return arg1.Divide(arg2);
\r
116 public float this[uint index]
\r
120 return ValueOfIndex(index);
\r
124 internal static Vector3 GetVector3FromPtr(global::System.IntPtr cPtr)
\r
126 Vector3 ret = new Vector3(cPtr, false);
\r
127 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
\r
132 public Vector3() : this(NDalicPINVOKE.new_Vector3__SWIG_0(), true)
\r
134 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
\r
137 public Vector3(float x, float y, float z) : this(NDalicPINVOKE.new_Vector3__SWIG_1(x, y, z), true)
\r
139 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
\r
142 public Vector3(float[] array) : this(NDalicPINVOKE.new_Vector3__SWIG_2(array), true)
\r
144 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
\r
147 public Vector3(Vector2 vec2) : this(NDalicPINVOKE.new_Vector3__SWIG_3(Vector2.getCPtr(vec2)), true)
\r
149 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
\r
152 public Vector3(Vector4 vec4) : this(NDalicPINVOKE.new_Vector3__SWIG_4(Vector4.getCPtr(vec4)), true)
\r
154 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
\r
157 public static Vector3 One
\r
161 global::System.IntPtr cPtr = NDalicPINVOKE.Vector3_ONE_get();
\r
162 Vector3 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector3(cPtr, false);
\r
163 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
\r
168 public static Vector3 XAxis
\r
172 global::System.IntPtr cPtr = NDalicPINVOKE.Vector3_XAXIS_get();
\r
173 Vector3 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector3(cPtr, false);
\r
174 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
\r
179 public static Vector3 YAxis
\r
183 global::System.IntPtr cPtr = NDalicPINVOKE.Vector3_YAXIS_get();
\r
184 Vector3 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector3(cPtr, false);
\r
185 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
\r
190 public static Vector3 ZAxis
\r
194 global::System.IntPtr cPtr = NDalicPINVOKE.Vector3_ZAXIS_get();
\r
195 Vector3 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector3(cPtr, false);
\r
196 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
\r
201 public static Vector3 NegativeXAxis
\r
205 global::System.IntPtr cPtr = NDalicPINVOKE.Vector3_NEGATIVE_XAXIS_get();
\r
206 Vector3 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector3(cPtr, false);
\r
207 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
\r
212 public static Vector3 NegativeYAxis
\r
216 global::System.IntPtr cPtr = NDalicPINVOKE.Vector3_NEGATIVE_YAXIS_get();
\r
217 Vector3 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector3(cPtr, false);
\r
218 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
\r
223 public static Vector3 NegativeZAxis
\r
227 global::System.IntPtr cPtr = NDalicPINVOKE.Vector3_NEGATIVE_ZAXIS_get();
\r
228 Vector3 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector3(cPtr, false);
\r
229 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
\r
234 public static Vector3 Zero
\r
238 global::System.IntPtr cPtr = NDalicPINVOKE.Vector3_ZERO_get();
\r
239 Vector3 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector3(cPtr, false);
\r
240 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
\r
245 internal Vector3 Assign(float[] array)
\r
247 Vector3 ret = new Vector3(NDalicPINVOKE.Vector3_Assign__SWIG_0(swigCPtr, array), false);
\r
248 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
\r
252 internal Vector3 Assign(Vector2 rhs)
\r
254 Vector3 ret = new Vector3(NDalicPINVOKE.Vector3_Assign__SWIG_1(swigCPtr, Vector2.getCPtr(rhs)), false);
\r
255 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
\r
259 internal Vector3 Assign(Vector4 rhs)
\r
261 Vector3 ret = new Vector3(NDalicPINVOKE.Vector3_Assign__SWIG_2(swigCPtr, Vector4.getCPtr(rhs)), false);
\r
262 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
\r
266 internal Vector3 Add(Vector3 rhs)
\r
268 Vector3 ret = new Vector3(NDalicPINVOKE.Vector3_Add(swigCPtr, Vector3.getCPtr(rhs)), true);
\r
269 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
\r
273 internal Vector3 AddAssign(Vector3 rhs)
\r
275 Vector3 ret = new Vector3(NDalicPINVOKE.Vector3_AddAssign(swigCPtr, Vector3.getCPtr(rhs)), false);
\r
276 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
\r
280 internal Vector3 Subtract(Vector3 rhs)
\r
282 Vector3 ret = new Vector3(NDalicPINVOKE.Vector3_Subtract__SWIG_0(swigCPtr, Vector3.getCPtr(rhs)), true);
\r
283 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
\r
287 internal Vector3 SubtractAssign(Vector3 rhs)
\r
289 Vector3 ret = new Vector3(NDalicPINVOKE.Vector3_SubtractAssign(swigCPtr, Vector3.getCPtr(rhs)), false);
\r
290 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
\r
294 internal Vector3 Multiply(Vector3 rhs)
\r
296 Vector3 ret = new Vector3(NDalicPINVOKE.Vector3_Multiply__SWIG_0(swigCPtr, Vector3.getCPtr(rhs)), true);
\r
297 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
\r
301 internal Vector3 Multiply(float rhs)
\r
303 Vector3 ret = new Vector3(NDalicPINVOKE.Vector3_Multiply__SWIG_1(swigCPtr, rhs), true);
\r
304 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
\r
308 internal Vector3 MultiplyAssign(Vector3 rhs)
\r
310 Vector3 ret = new Vector3(NDalicPINVOKE.Vector3_MultiplyAssign__SWIG_0(swigCPtr, Vector3.getCPtr(rhs)), false);
\r
311 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
\r
315 internal Vector3 MultiplyAssign(float rhs)
\r
317 Vector3 ret = new Vector3(NDalicPINVOKE.Vector3_MultiplyAssign__SWIG_1(swigCPtr, rhs), false);
\r
318 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
\r
322 internal Vector3 MultiplyAssign(Rotation rhs)
\r
324 Vector3 ret = new Vector3(NDalicPINVOKE.Vector3_MultiplyAssign__SWIG_2(swigCPtr, Rotation.getCPtr(rhs)), false);
\r
325 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
\r
329 internal Vector3 Divide(Vector3 rhs)
\r
331 Vector3 ret = new Vector3(NDalicPINVOKE.Vector3_Divide__SWIG_0(swigCPtr, Vector3.getCPtr(rhs)), true);
\r
332 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
\r
336 internal Vector3 Divide(float rhs)
\r
338 Vector3 ret = new Vector3(NDalicPINVOKE.Vector3_Divide__SWIG_1(swigCPtr, rhs), true);
\r
339 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
\r
343 internal Vector3 DivideAssign(Vector3 rhs)
\r
345 Vector3 ret = new Vector3(NDalicPINVOKE.Vector3_DivideAssign__SWIG_0(swigCPtr, Vector3.getCPtr(rhs)), false);
\r
346 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
\r
350 internal Vector3 DivideAssign(float rhs)
\r
352 Vector3 ret = new Vector3(NDalicPINVOKE.Vector3_DivideAssign__SWIG_1(swigCPtr, rhs), false);
\r
353 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
\r
357 internal Vector3 Subtract()
\r
359 Vector3 ret = new Vector3(NDalicPINVOKE.Vector3_Subtract__SWIG_1(swigCPtr), true);
\r
360 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
\r
364 internal bool EqualTo(Vector3 rhs)
\r
366 bool ret = NDalicPINVOKE.Vector3_EqualTo(swigCPtr, Vector3.getCPtr(rhs));
\r
367 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
\r
371 internal bool NotEqualTo(Vector3 rhs)
\r
373 bool ret = NDalicPINVOKE.Vector3_NotEqualTo(swigCPtr, Vector3.getCPtr(rhs));
\r
374 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
\r
378 internal float ValueOfIndex(uint index)
\r
380 float ret = NDalicPINVOKE.Vector3_ValueOfIndex__SWIG_0(swigCPtr, index);
\r
381 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
\r
385 internal float Dot(Vector3 other)
\r
387 float ret = NDalicPINVOKE.Vector3_Dot(swigCPtr, Vector3.getCPtr(other));
\r
388 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
\r
392 internal Vector3 Cross(Vector3 other)
\r
394 Vector3 ret = new Vector3(NDalicPINVOKE.Vector3_Cross(swigCPtr, Vector3.getCPtr(other)), true);
\r
395 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
\r
399 public float Length()
\r
401 float ret = NDalicPINVOKE.Vector3_Length(swigCPtr);
\r
402 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
\r
406 public float LengthSquared()
\r
408 float ret = NDalicPINVOKE.Vector3_LengthSquared(swigCPtr);
\r
409 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
\r
413 public void Normalize()
\r
415 NDalicPINVOKE.Vector3_Normalize(swigCPtr);
\r
416 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
\r
419 public void Clamp(Vector3 min, Vector3 max)
\r
421 NDalicPINVOKE.Vector3_Clamp(swigCPtr, Vector3.getCPtr(min), Vector3.getCPtr(max));
\r
422 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
\r
425 internal SWIGTYPE_p_float AsFloat()
\r
427 global::System.IntPtr cPtr = NDalicPINVOKE.Vector3_AsFloat__SWIG_0(swigCPtr);
\r
428 SWIGTYPE_p_float ret = (cPtr == global::System.IntPtr.Zero) ? null : new SWIGTYPE_p_float(cPtr, false);
\r
429 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
\r
433 public Vector2 GetVectorXY()
\r
435 Vector2 ret = new Vector2(NDalicPINVOKE.Vector3_GetVectorXY__SWIG_0(swigCPtr), false);
\r
436 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
\r
440 public Vector2 GetVectorYZ()
\r
442 Vector2 ret = new Vector2(NDalicPINVOKE.Vector3_GetVectorYZ__SWIG_0(swigCPtr), false);
\r
443 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
\r
451 NDalicPINVOKE.Vector3_X_set(swigCPtr, value);
\r
452 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
\r
456 float ret = NDalicPINVOKE.Vector3_X_get(swigCPtr);
\r
457 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
\r
466 NDalicPINVOKE.Vector3_Width_set(swigCPtr, value);
\r
467 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
\r
471 float ret = NDalicPINVOKE.Vector3_Width_get(swigCPtr);
\r
472 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
\r
481 NDalicPINVOKE.Vector3_r_set(swigCPtr, value);
\r
482 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
\r
486 float ret = NDalicPINVOKE.Vector3_r_get(swigCPtr);
\r
487 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
\r
496 NDalicPINVOKE.Vector3_Y_set(swigCPtr, value);
\r
497 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
\r
501 float ret = NDalicPINVOKE.Vector3_Y_get(swigCPtr);
\r
502 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
\r
507 public float Height
\r
511 NDalicPINVOKE.Vector3_Height_set(swigCPtr, value);
\r
512 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
\r
516 float ret = NDalicPINVOKE.Vector3_Height_get(swigCPtr);
\r
517 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
\r
526 NDalicPINVOKE.Vector3_g_set(swigCPtr, value);
\r
527 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
\r
531 float ret = NDalicPINVOKE.Vector3_g_get(swigCPtr);
\r
532 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
\r
541 NDalicPINVOKE.Vector3_Z_set(swigCPtr, value);
\r
542 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
\r
546 float ret = NDalicPINVOKE.Vector3_Z_get(swigCPtr);
\r
547 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
\r
556 NDalicPINVOKE.Vector3_Depth_set(swigCPtr, value);
\r
557 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
\r
561 float ret = NDalicPINVOKE.Vector3_Depth_get(swigCPtr);
\r
562 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
\r
571 NDalicPINVOKE.Vector3_b_set(swigCPtr, value);
\r
572 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
\r
576 float ret = NDalicPINVOKE.Vector3_b_get(swigCPtr);
\r
577 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
\r