2 * Copyright(c) 2019 Samsung Electronics Co., Ltd.
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
8 * http://www.apache.org/licenses/LICENSE-2.0
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.
18 using System.ComponentModel;
19 using Tizen.NUI.Binding;
25 /// A four-dimensional vector.
27 /// <since_tizen> 3 </since_tizen>
28 [Binding.TypeConverter(typeof(Vector4TypeConverter))]
29 public class Vector4 : Disposable, ICloneable
33 /// The default constructor initializes the vector to 0.
35 /// <since_tizen> 3 </since_tizen>
36 public Vector4() : this(Interop.Vector4.new_Vector4__SWIG_0(), true)
38 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
42 /// The conversion constructor from four floats.
44 /// <param name="x">The x (or r/s) component.</param>
45 /// <param name="y">The y (or g/t) component.</param>
46 /// <param name="z">The z (or b/p) component.</param>
47 /// <param name="w">The w (or a/q) component.</param>
48 /// <since_tizen> 3 </since_tizen>
49 public Vector4(float x, float y, float z, float w) : this(Interop.Vector4.new_Vector4__SWIG_1(x, y, z, w), true)
51 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
55 /// The conversion constructor from an array of four floats.
57 /// <param name="array">The array of either xyzw/rgba/stpq.</param>
58 /// <since_tizen> 3 </since_tizen>
59 public Vector4(float[] array) : this(Interop.Vector4.new_Vector4__SWIG_2(array), true)
61 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
65 /// The conversion constructor from Vector2.
67 /// <param name="vec2">Vector2 to copy from, z and w are initialized to 0.</param>
68 /// <since_tizen> 3 </since_tizen>
69 public Vector4(Vector2 vec2) : this(Interop.Vector4.new_Vector4__SWIG_3(Vector2.getCPtr(vec2)), true)
71 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
75 /// The conversion constructor from Vector3.
77 /// <param name="vec3">Vector3 to copy from, w is initialized to 0.</param>
78 /// <since_tizen> 3 </since_tizen>
79 public Vector4(Vector3 vec3) : this(Interop.Vector4.new_Vector4__SWIG_4(Vector3.getCPtr(vec3)), true)
81 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
84 internal Vector4(global::System.IntPtr cPtr, bool cMemoryOwn) : base(cPtr, cMemoryOwn)
88 internal Vector4(Vector4ChangedCallback cb, float x, float y, float z, float w) : this(Interop.Vector4.new_Vector4__SWIG_1(x, y, z, w), true)
91 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
93 internal delegate void Vector4ChangedCallback(float x, float y, float z, float w);
94 private Vector4ChangedCallback callback = null;
97 /// (1.0f,1.0f,1.0f,1.0f).
99 /// <since_tizen> 3 </since_tizen>
100 public static Vector4 One
104 global::System.IntPtr cPtr = Interop.Vector4.Vector4_ONE_get();
105 Vector4 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector4(cPtr, false);
106 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
112 /// (1.0f,0.0f,0.0f,0.0f).
114 /// <since_tizen> 3 </since_tizen>
115 public static Vector4 XAxis
119 global::System.IntPtr cPtr = Interop.Vector4.Vector4_XAXIS_get();
120 Vector4 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector4(cPtr, false);
121 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
127 /// (0.0f,1.0f,0.0f,0.0f).
129 /// <since_tizen> 3 </since_tizen>
130 public static Vector4 YAxis
134 global::System.IntPtr cPtr = Interop.Vector4.Vector4_YAXIS_get();
135 Vector4 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector4(cPtr, false);
136 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
142 /// (0.0f,0.0f,1.0f,0.0f).
144 /// <since_tizen> 3 </since_tizen>
145 public static Vector4 ZAxis
149 global::System.IntPtr cPtr = Interop.Vector4.Vector4_ZAXIS_get();
150 Vector4 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector4(cPtr, false);
151 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
157 /// (0.0f, 0.0f, 0.0f, 0.0f).
159 /// <since_tizen> 3 </since_tizen>
160 public static Vector4 Zero
164 global::System.IntPtr cPtr = Interop.Vector4.Vector4_ZERO_get();
165 Vector4 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector4(cPtr, false);
166 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
175 /// The setter is deprecated in API8 and will be removed in API10. Please use new Vector4(...) constructor.
178 /// // DO NOT use like the followings!
179 /// Vector4 vector4 = new Vector4();
180 /// vector4.X = 0.1f;
181 /// // Please USE like this
182 /// float x = 0.1f, y = 0.5f, z = 0.9f, w = 1.0f;
183 /// Vector4 vector4 = new Vector4(x, y, z, w);
185 /// <since_tizen> 3 </since_tizen>
190 Tizen.Log.Fatal("NUI", "Please do not use this setter, Deprecated in API8, will be removed in API10. please use new Vector4(...) constructor");
192 Interop.Vector4.Vector4_X_set(swigCPtr, value);
193 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
195 callback?.Invoke(X, Y, Z, W);
199 float ret = Interop.Vector4.Vector4_X_get(swigCPtr);
200 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
206 /// The red component.
209 /// The setter is deprecated in API8 and will be removed in API10. Please use new Vector4(...) constructor.
212 /// // DO NOT use like the followings!
213 /// Vector4 vector4 = new Vector4();
214 /// vector4.R = 0.1f;
215 /// // Please USE like this
216 /// float r = 0.1f, g = 0.5f, b = 0.9f, a = 1.0f;
217 /// Vector4 vector4 = new Vector4(r, g, b, a);
219 /// <since_tizen> 3 </since_tizen>
224 Tizen.Log.Fatal("NUI", "Please do not use this setter, Deprecated in API8, will be removed in API10. please use new Vector4(...) constructor");
226 Interop.Vector4.Vector4_r_set(swigCPtr, value);
227 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
229 callback?.Invoke(X, Y, Z, W);
233 float ret = Interop.Vector4.Vector4_r_get(swigCPtr);
234 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
243 /// The setter is deprecated in API8 and will be removed in API10. Please use new Vector4(...) constructor.
246 /// // DO NOT use like the followings!
247 /// Vector4 vector4 = new Vector4();
248 /// vector4.S = 0.1f;
249 /// // Please USE like this
250 /// float s = 0.1f, t = 0.5f, p = 0.9f, q = 1.0f;
251 /// Vector4 vector4 = new Vector4(s, t, p, q);
253 /// <since_tizen> 3 </since_tizen>
258 Tizen.Log.Fatal("NUI", "Please do not use this setter, Deprecated in API8, will be removed in API10. please use new Vector4(...) constructor");
260 Interop.Vector4.Vector4_s_set(swigCPtr, value);
261 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
263 callback?.Invoke(X, Y, Z, W);
267 float ret = Interop.Vector4.Vector4_s_get(swigCPtr);
268 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
277 /// The setter is deprecated in API8 and will be removed in API10. Please use new Vector4(...) constructor.
280 /// // DO NOT use like the followings!
281 /// Vector4 vector4 = new Vector4();
282 /// vector4.Y = 0.5f;
283 /// // Please USE like this
284 /// float x = 0.1f, y = 0.5f, z = 0.9f, w = 1.0f;
285 /// Vector4 vector4 = new Vector4(x, y, z, w);
287 /// <since_tizen> 3 </since_tizen>
292 Tizen.Log.Fatal("NUI", "Please do not use this setter, Deprecated in API8, will be removed in API10. please use new Vector4(...) constructor");
294 Interop.Vector4.Vector4_Y_set(swigCPtr, value);
295 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
297 callback?.Invoke(X, Y, Z, W);
301 float ret = Interop.Vector4.Vector4_Y_get(swigCPtr);
302 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
308 /// The green component.
311 /// The setter is deprecated in API8 and will be removed in API10. Please use new Vector4(...) constructor.
314 /// // DO NOT use like the followings!
315 /// Vector4 vector4 = new Vector4();
316 /// vector4.G = 0.5f;
317 /// // Please USE like this
318 /// float r = 0.1f, g = 0.5f, b = 0.9f, a = 1.0f;
319 /// Vector4 vector4 = new Vector4(r, g, b, a);
321 /// <since_tizen> 3 </since_tizen>
326 Tizen.Log.Fatal("NUI", "Please do not use this setter, Deprecated in API8, will be removed in API10. please use new Vector4(...) constructor");
328 Interop.Vector4.Vector4_g_set(swigCPtr, value);
329 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
331 callback?.Invoke(X, Y, Z, W);
335 float ret = Interop.Vector4.Vector4_g_get(swigCPtr);
336 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
345 /// The setter is deprecated in API8 and will be removed in API10. Please use new Vector4(...) constructor.
348 /// // DO NOT use like the followings!
349 /// Vector4 vector4 = new Vector4();
350 /// vector4.T = 0.5f;
351 /// // Please USE like this
352 /// float s = 0.1f, t = 0.5f, p = 0.9f, q = 1.0f;
353 /// Vector4 vector4 = new Vector4(s, t, p, q);
355 /// <since_tizen> 3 </since_tizen>
360 Tizen.Log.Fatal("NUI", "Please do not use this setter, Deprecated in API8, will be removed in API10. please use new Vector4(...) constructor");
362 Interop.Vector4.Vector4_t_set(swigCPtr, value);
363 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
365 callback?.Invoke(X, Y, Z, W);
369 float ret = Interop.Vector4.Vector4_t_get(swigCPtr);
370 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
379 /// The setter is deprecated in API8 and will be removed in API10. Please use new Vector4(...) constructor.
382 /// // DO NOT use like the followings!
383 /// Vector4 vector4 = new Vector4();
384 /// vector4.Z = 0.9f;
385 /// // Please USE like this
386 /// float x = 0.1f, y = 0.5f, z = 0.9f, w = 1.0f;
387 /// Vector4 vector4 = new Vector4(x, y, z, w);
389 /// <since_tizen> 3 </since_tizen>
394 Tizen.Log.Fatal("NUI", "Please do not use this setter, Deprecated in API8, will be removed in API10. please use new Vector4(...) constructor");
396 Interop.Vector4.Vector4_Z_set(swigCPtr, value);
397 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
399 callback?.Invoke(X, Y, Z, W);
403 float ret = Interop.Vector4.Vector4_Z_get(swigCPtr);
404 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
410 /// The blue component.
413 /// The setter is deprecated in API8 and will be removed in API10. Please use new Vector4(...) constructor.
416 /// // DO NOT use like the followings!
417 /// Vector4 vector4 = new Vector4();
418 /// vector4.B = 0.9f;
419 /// // Please USE like this
420 /// float r = 0.1f, g = 0.5f, b = 0.9f, a = 1.0f;
421 /// Vector4 vector4 = new Vector4(r, g, b, a);
423 /// <since_tizen> 3 </since_tizen>
424 [Obsolete("Please do not use this setter, Deprecated in API8, will be removed in API10. please use new Vector4(...) constructor")]
429 Tizen.Log.Fatal("NUI", "Please do not use this setter, Deprecated in API8, will be removed in API10. please use new Vector4(...) constructor");
431 Interop.Vector4.Vector4_b_set(swigCPtr, value);
432 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
434 callback?.Invoke(X, Y, Z, W);
438 float ret = Interop.Vector4.Vector4_b_get(swigCPtr);
439 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
448 /// The setter is deprecated in API8 and will be removed in API10. Please use new Vector4(...) constructor.
451 /// // DO NOT use like the followings!
452 /// Vector4 vector4 = new Vector4();
453 /// vector4.P = 0.9f;
454 /// // Please USE like this
455 /// float s = 0.1f, t = 0.5f, p = 0.9f, q = 1.0f;
456 /// Vector4 vector4 = new Vector4(s, t, p, q);
458 /// <since_tizen> 3 </since_tizen>
463 Tizen.Log.Fatal("NUI", "Please do not use this setter, Deprecated in API8, will be removed in API10. please use new Vector4(...) constructor");
465 Interop.Vector4.Vector4_p_set(swigCPtr, value);
466 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
468 callback?.Invoke(X, Y, Z, W);
472 float ret = Interop.Vector4.Vector4_p_get(swigCPtr);
473 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
482 /// The setter is deprecated in API8 and will be removed in API10. Please use new Vector4(...) constructor.
485 /// // DO NOT use like the followings!
486 /// Vector4 vector4 = new Vector4();
487 /// vector4.W = 1.0f;
488 /// // Please USE like this
489 /// float x = 0.1f, y = 0.5f, z = 0.9f, w = 1.0f;
490 /// Vector4 vector4 = new Vector4(x, y, z, w);
492 /// <since_tizen> 3 </since_tizen>
497 Tizen.Log.Fatal("NUI", "Please do not use this setter, Deprecated in API8, will be removed in API10. please use new Vector4(...) constructor");
499 Interop.Vector4.Vector4_W_set(swigCPtr, value);
500 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
502 callback?.Invoke(X, Y, Z, W);
506 float ret = Interop.Vector4.Vector4_W_get(swigCPtr);
507 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
513 /// The alpha component.
516 /// The setter is deprecated in API8 and will be removed in API10. Please use new Vector4(...) constructor.
519 /// // DO NOT use like the followings!
520 /// Vector4 vector4 = new Vector4();
521 /// vector4.A = 1.0f;
522 /// // Please USE like this
523 /// float r = 0.1f, g = 0.5f, b = 0.9f, a = 1.0f;
524 /// Vector4 vector4 = new Vector4(r, g, b, a);
526 /// <since_tizen> 3 </since_tizen>
531 Tizen.Log.Fatal("NUI", "Please do not use this setter, Deprecated in API8, will be removed in API10. please use new Vector4(...) constructor");
533 Interop.Vector4.Vector4_a_set(swigCPtr, value);
534 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
536 callback?.Invoke(X, Y, Z, W);
540 float ret = Interop.Vector4.Vector4_a_get(swigCPtr);
541 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
550 /// The setter is deprecated in API8 and will be removed in API10. Please use new Vector4(...) constructor.
553 /// // DO NOT use like the followings!
554 /// Vector4 vector4 = new Vector4();
555 /// vector4.Q = 1.0f;
556 /// // Please USE like this
557 /// float s = 0.1f, t = 0.5f, p = 0.9f, q = 1.0f;
558 /// Vector4 vector4 = new Vector4(s, t, p, q);
560 /// <since_tizen> 3 </since_tizen>
565 Tizen.Log.Fatal("NUI", "Please do not use this setter, Deprecated in API8, will be removed in API10. please use new Vector4(...) constructor");
567 Interop.Vector4.Vector4_q_set(swigCPtr, value);
568 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
570 callback?.Invoke(X, Y, Z, W);
574 float ret = Interop.Vector4.Vector4_q_get(swigCPtr);
575 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
581 /// The array subscript operator overload.
583 /// <param name="index">The subscript index.</param>
584 /// <returns>The float at the given index.</returns>
585 /// <since_tizen> 3 </since_tizen>
586 public float this[uint index]
590 return ValueOfIndex(index);
596 /// The addition operator.
598 /// <param name="arg1">The first value.</param>
599 /// <param name="arg2">The second value.</param>
600 /// <returns>The vector containing the result of the addition.</returns>
601 /// <since_tizen> 3 </since_tizen>
602 public static Vector4 operator +(Vector4 arg1, Vector4 arg2)
604 return arg1?.Add(arg2);
608 /// The subtraction operator.
610 /// <param name="arg1">The first value.</param>
611 /// <param name="arg2">The second value.</param>
612 /// <returns>The vector containing the result of the subtraction.</returns>
613 /// <since_tizen> 3 </since_tizen>
614 public static Vector4 operator -(Vector4 arg1, Vector4 arg2)
616 return arg1?.Subtract(arg2);
620 /// The unary negation operator.
622 /// <param name="arg1">The target value.</param>
623 /// <returns>The vector containing the negation.</returns>
624 /// <since_tizen> 3 </since_tizen>
625 public static Vector4 operator -(Vector4 arg1)
627 return arg1?.Subtract();
631 /// The multiplication operator.
633 /// <param name="arg1">The first value.</param>
634 /// <param name="arg2">The second value.</param>
635 /// <returns>The vector containing the result of the multiplication.</returns>
636 /// <since_tizen> 3 </since_tizen>
637 public static Vector4 operator *(Vector4 arg1, Vector4 arg2)
639 return arg1?.Multiply(arg2);
643 /// The multiplication operator.
645 /// <param name="arg1">The first value.</param>
646 /// <param name="arg2">The float value to scale the vector.</param>
647 /// <returns>The vector containing the result of scaling.</returns>
648 /// <since_tizen> 3 </since_tizen>
649 public static Vector4 operator *(Vector4 arg1, float arg2)
651 return arg1?.Multiply(arg2);
655 /// The division operator.
657 /// <param name="arg1">The first value.</param>
658 /// <param name="arg2">The second value.</param>
659 /// <returns>The vector containing the result of the division.</returns>
660 /// <since_tizen> 3 </since_tizen>
661 public static Vector4 operator /(Vector4 arg1, Vector4 arg2)
663 return arg1?.Divide(arg2);
667 /// The division operator.
669 /// <param name="arg1">The first value.</param>
670 /// <param name="arg2">The float value to scale the vector by.</param>
671 /// <returns>The vector containing the result of scaling.</returns>
672 /// <since_tizen> 3 </since_tizen>
673 public static Vector4 operator /(Vector4 arg1, float arg2)
675 return arg1?.Divide(arg2);
679 /// Determines whether the specified object is equal to the current object.
681 /// <param name="obj">The object to compare with the current object.</param>
682 /// <returns>true if the specified object is equal to the current object; otherwise, false.</returns>
683 public override bool Equals(System.Object obj)
685 Vector4 vector4 = obj as Vector4;
687 if (X == vector4?.X && Y == vector4?.Y && Z == vector4?.Z && W == vector4?.W)
695 /// Gets the the hash code of this Vector4.
697 /// <returns>The Hash Code.</returns>
698 /// <since_tizen> 6 </since_tizen>
699 public override int GetHashCode()
701 return swigCPtr.Handle.GetHashCode();
705 /// Returns the length of the vector.
707 /// <returns>The length.</returns>
708 /// <since_tizen> 3 </since_tizen>
709 public float Length()
711 float ret = Interop.Vector4.Vector4_Length(swigCPtr);
712 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
717 /// Returns the length of the vector squared.<br />
718 /// This is faster than using Length() when performing
719 /// threshold checks as it avoids use of the square root.<br />
721 /// <returns>The length of the vector squared.</returns>
722 /// <since_tizen> 3 </since_tizen>
723 public float LengthSquared()
725 float ret = Interop.Vector4.Vector4_LengthSquared(swigCPtr);
726 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
731 /// Normalizes the vector.<br />
732 /// Sets the vector to unit length whilst maintaining its direction.<br />
734 /// <since_tizen> 3 </since_tizen>
735 public void Normalize()
737 Interop.Vector4.Vector4_Normalize(swigCPtr);
738 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
742 /// Clamps the vector between minimum and maximum vectors.
744 /// <param name="min">The minimum vector.</param>
745 /// <param name="max">The maximum vector.</param>
746 /// <since_tizen> 3 </since_tizen>
747 public void Clamp(Vector4 min, Vector4 max)
749 Interop.Vector4.Vector4_Clamp(swigCPtr, Vector4.getCPtr(min), Vector4.getCPtr(max));
750 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
754 [EditorBrowsable(EditorBrowsableState.Never)]
755 public object Clone() => new Vector4(X, Y, Z, W);
757 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Vector4 obj)
759 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
762 internal static Vector4 GetVector4FromPtr(global::System.IntPtr cPtr)
764 Vector4 ret = new Vector4(cPtr, false);
765 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
769 internal SWIGTYPE_p_float AsFloat()
771 global::System.IntPtr cPtr = Interop.Vector4.Vector4_AsFloat__SWIG_0(swigCPtr);
772 SWIGTYPE_p_float ret = (cPtr == global::System.IntPtr.Zero) ? null : new SWIGTYPE_p_float(cPtr);
773 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
777 internal float Dot(Vector3 other)
779 float ret = Interop.Vector4.Vector4_Dot__SWIG_0(swigCPtr, Vector3.getCPtr(other));
780 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
784 internal float Dot(Vector4 other)
786 float ret = Interop.Vector4.Vector4_Dot__SWIG_1(swigCPtr, Vector4.getCPtr(other));
787 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
791 internal float Dot4(Vector4 other)
793 float ret = Interop.Vector4.Vector4_Dot4(swigCPtr, Vector4.getCPtr(other));
794 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
798 internal Vector4 Cross(Vector4 other)
800 Vector4 ret = new Vector4(Interop.Vector4.Vector4_Cross(swigCPtr, Vector4.getCPtr(other)), true);
801 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
805 /// This will not be public opened.
806 [EditorBrowsable(EditorBrowsableState.Never)]
807 protected override void ReleaseSwigCPtr(System.Runtime.InteropServices.HandleRef swigCPtr)
809 Interop.Vector4.delete_Vector4(swigCPtr);
812 private Vector4 Add(Vector4 rhs)
814 Vector4 ret = new Vector4(Interop.Vector4.Vector4_Add(swigCPtr, Vector4.getCPtr(rhs)), true);
815 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
819 private Vector4 AddAssign(Vector4 rhs)
821 Vector4 ret = new Vector4(Interop.Vector4.Vector4_AddAssign(swigCPtr, Vector4.getCPtr(rhs)), false);
822 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
826 private Vector4 Subtract(Vector4 rhs)
828 Vector4 ret = new Vector4(Interop.Vector4.Vector4_Subtract__SWIG_0(swigCPtr, Vector4.getCPtr(rhs)), true);
829 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
833 private Vector4 SubtractAssign(Vector4 rhs)
835 Vector4 ret = new Vector4(Interop.Vector4.Vector4_SubtractAssign(swigCPtr, Vector4.getCPtr(rhs)), false);
836 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
840 private Vector4 Multiply(Vector4 rhs)
842 Vector4 ret = new Vector4(Interop.Vector4.Vector4_Multiply__SWIG_0(swigCPtr, Vector4.getCPtr(rhs)), true);
843 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
847 private Vector4 Multiply(float rhs)
849 Vector4 ret = new Vector4(Interop.Vector4.Vector4_Multiply__SWIG_1(swigCPtr, rhs), true);
850 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
854 private Vector4 MultiplyAssign(Vector4 rhs)
856 Vector4 ret = new Vector4(Interop.Vector4.Vector4_MultiplyAssign__SWIG_0(swigCPtr, Vector4.getCPtr(rhs)), false);
857 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
861 private Vector4 MultiplyAssign(float rhs)
863 Vector4 ret = new Vector4(Interop.Vector4.Vector4_MultiplyAssign__SWIG_1(swigCPtr, rhs), false);
864 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
868 private Vector4 Divide(Vector4 rhs)
870 Vector4 ret = new Vector4(Interop.Vector4.Vector4_Divide__SWIG_0(swigCPtr, Vector4.getCPtr(rhs)), true);
871 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
875 private Vector4 Divide(float rhs)
877 Vector4 ret = new Vector4(Interop.Vector4.Vector4_Divide__SWIG_1(swigCPtr, rhs), true);
878 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
882 private Vector4 DivideAssign(Vector4 rhs)
884 Vector4 ret = new Vector4(Interop.Vector4.Vector4_DivideAssign__SWIG_0(swigCPtr, Vector4.getCPtr(rhs)), false);
885 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
889 private Vector4 DivideAssign(float rhs)
891 Vector4 ret = new Vector4(Interop.Vector4.Vector4_DivideAssign__SWIG_1(swigCPtr, rhs), false);
892 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
896 private Vector4 Subtract()
898 Vector4 ret = new Vector4(Interop.Vector4.Vector4_Subtract__SWIG_1(swigCPtr), true);
899 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
903 private bool EqualTo(Vector4 rhs)
905 bool ret = Interop.Vector4.Vector4_EqualTo(swigCPtr, Vector4.getCPtr(rhs));
906 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
910 private bool NotEqualTo(Vector4 rhs)
912 bool ret = Interop.Vector4.Vector4_NotEqualTo(swigCPtr, Vector4.getCPtr(rhs));
913 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
917 private float ValueOfIndex(uint index)
919 float ret = Interop.Vector4.Vector4_ValueOfIndex__SWIG_0(swigCPtr, index);
920 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();