/*
* Copyright(c) 2019 Samsung Electronics Co., Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
using System;
using System.ComponentModel;
using Tizen.NUI.Binding;
namespace Tizen.NUI
{
///
/// A four-dimensional vector.
///
/// 3
[Binding.TypeConverter(typeof(Vector4TypeConverter))]
public class Vector4 : Disposable, ICloneable
{
///
/// The default constructor initializes the vector to 0.
///
/// 3
public Vector4() : this(Interop.Vector4.NewVector4(), true)
{
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
}
///
/// The conversion constructor from four floats.
///
/// The x (or r/s) component.
/// The y (or g/t) component.
/// The z (or b/p) component.
/// The w (or a/q) component.
/// 3
public Vector4(float x, float y, float z, float w) : this(Interop.Vector4.NewVector4(x, y, z, w), true)
{
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
}
///
/// The conversion constructor from an array of four floats.
///
/// The array of either xyzw/rgba/stpq.
/// 3
public Vector4(float[] array) : this(Interop.Vector4.NewVector4(array), true)
{
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
}
///
/// The conversion constructor from Vector2.
///
/// Vector2 to copy from, z and w are initialized to 0.
/// 3
public Vector4(Vector2 vec2) : this(Interop.Vector4.NewVector4WithVector2(Vector2.getCPtr(vec2)), true)
{
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
}
///
/// The conversion constructor from Vector3.
///
/// Vector3 to copy from, w is initialized to 0.
/// 3
public Vector4(Vector3 vec3) : this(Interop.Vector4.NewVector4WithVector3(Vector3.getCPtr(vec3)), true)
{
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
}
internal Vector4(global::System.IntPtr cPtr, bool cMemoryOwn) : base(cPtr, cMemoryOwn)
{
}
internal Vector4(Vector4ChangedCallback cb, float x, float y, float z, float w) : this(Interop.Vector4.NewVector4(x, y, z, w), true)
{
callback = cb;
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
}
internal delegate void Vector4ChangedCallback(float x, float y, float z, float w);
private Vector4ChangedCallback callback = null;
///
/// (1.0f,1.0f,1.0f,1.0f).
///
/// 3
public static Vector4 One
{
get
{
global::System.IntPtr cPtr = Interop.Vector4.OneGet();
Vector4 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector4(cPtr, false);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw new InvalidOperationException("FATAL: get Exception", NDalicPINVOKE.SWIGPendingException.Retrieve());
return ret;
}
}
///
/// (1.0f,0.0f,0.0f,0.0f).
///
/// 3
public static Vector4 XAxis
{
get
{
global::System.IntPtr cPtr = Interop.Vector4.XaxisGet();
Vector4 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector4(cPtr, false);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw new InvalidOperationException("FATAL: get Exception", NDalicPINVOKE.SWIGPendingException.Retrieve());
return ret;
}
}
///
/// (0.0f,1.0f,0.0f,0.0f).
///
/// 3
public static Vector4 YAxis
{
get
{
global::System.IntPtr cPtr = Interop.Vector4.YaxisGet();
Vector4 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector4(cPtr, false);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw new InvalidOperationException("FATAL: get Exception", NDalicPINVOKE.SWIGPendingException.Retrieve());
return ret;
}
}
///
/// (0.0f,0.0f,1.0f,0.0f).
///
/// 3
public static Vector4 ZAxis
{
get
{
global::System.IntPtr cPtr = Interop.Vector4.ZaxisGet();
Vector4 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector4(cPtr, false);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw new InvalidOperationException("FATAL: get Exception", NDalicPINVOKE.SWIGPendingException.Retrieve());
return ret;
}
}
///
/// (0.0f, 0.0f, 0.0f, 0.0f).
///
/// 3
public static Vector4 Zero
{
get
{
global::System.IntPtr cPtr = Interop.Vector4.ZeroGet();
Vector4 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector4(cPtr, false);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw new InvalidOperationException("FATAL: get Exception", NDalicPINVOKE.SWIGPendingException.Retrieve());
return ret;
}
}
///
/// The x component.
///
///
/// The setter is deprecated in API8 and will be removed in API10. Please use new Vector4(...) constructor.
///
///
/// // DO NOT use like the followings!
/// Vector4 vector4 = new Vector4();
/// vector4.X = 0.1f;
/// // Please USE like this
/// float x = 0.1f, y = 0.5f, z = 0.9f, w = 1.0f;
/// Vector4 vector4 = new Vector4(x, y, z, w);
///
/// 3
public float X
{
set
{
Tizen.Log.Fatal("NUI", "Please do not use this setter, Deprecated in API8, will be removed in API10. please use new Vector4(...) constructor");
Interop.Vector4.XSet(SwigCPtr, value);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
callback?.Invoke(X, Y, Z, W);
}
get
{
float ret = Interop.Vector4.XGet(SwigCPtr);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw new InvalidOperationException("FATAL: get Exception", NDalicPINVOKE.SWIGPendingException.Retrieve());
return ret;
}
}
///
/// The red component.
///
///
/// The setter is deprecated in API8 and will be removed in API10. Please use new Vector4(...) constructor.
///
///
/// // DO NOT use like the followings!
/// Vector4 vector4 = new Vector4();
/// vector4.R = 0.1f;
/// // Please USE like this
/// float r = 0.1f, g = 0.5f, b = 0.9f, a = 1.0f;
/// Vector4 vector4 = new Vector4(r, g, b, a);
///
/// 3
public float R
{
set
{
Tizen.Log.Fatal("NUI", "Please do not use this setter, Deprecated in API8, will be removed in API10. please use new Vector4(...) constructor");
Interop.Vector4.RSet(SwigCPtr, value);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
callback?.Invoke(X, Y, Z, W);
}
get
{
float ret = Interop.Vector4.RGet(SwigCPtr);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw new InvalidOperationException("FATAL: get Exception", NDalicPINVOKE.SWIGPendingException.Retrieve());
return ret;
}
}
///
/// The s component.
///
///
/// The setter is deprecated in API8 and will be removed in API10. Please use new Vector4(...) constructor.
///
///
/// // DO NOT use like the followings!
/// Vector4 vector4 = new Vector4();
/// vector4.S = 0.1f;
/// // Please USE like this
/// float s = 0.1f, t = 0.5f, p = 0.9f, q = 1.0f;
/// Vector4 vector4 = new Vector4(s, t, p, q);
///
/// 3
public float S
{
set
{
Tizen.Log.Fatal("NUI", "Please do not use this setter, Deprecated in API8, will be removed in API10. please use new Vector4(...) constructor");
Interop.Vector4.SSet(SwigCPtr, value);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
callback?.Invoke(X, Y, Z, W);
}
get
{
float ret = Interop.Vector4.SGet(SwigCPtr);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw new InvalidOperationException("FATAL: get Exception", NDalicPINVOKE.SWIGPendingException.Retrieve());
return ret;
}
}
///
/// The y component.
///
///
/// The setter is deprecated in API8 and will be removed in API10. Please use new Vector4(...) constructor.
///
///
/// // DO NOT use like the followings!
/// Vector4 vector4 = new Vector4();
/// vector4.Y = 0.5f;
/// // Please USE like this
/// float x = 0.1f, y = 0.5f, z = 0.9f, w = 1.0f;
/// Vector4 vector4 = new Vector4(x, y, z, w);
///
/// 3
public float Y
{
set
{
Tizen.Log.Fatal("NUI", "Please do not use this setter, Deprecated in API8, will be removed in API10. please use new Vector4(...) constructor");
Interop.Vector4.YSet(SwigCPtr, value);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
callback?.Invoke(X, Y, Z, W);
}
get
{
float ret = Interop.Vector4.YGet(SwigCPtr);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw new InvalidOperationException("FATAL: get Exception", NDalicPINVOKE.SWIGPendingException.Retrieve());
return ret;
}
}
///
/// The green component.
///
///
/// The setter is deprecated in API8 and will be removed in API10. Please use new Vector4(...) constructor.
///
///
/// // DO NOT use like the followings!
/// Vector4 vector4 = new Vector4();
/// vector4.G = 0.5f;
/// // Please USE like this
/// float r = 0.1f, g = 0.5f, b = 0.9f, a = 1.0f;
/// Vector4 vector4 = new Vector4(r, g, b, a);
///
/// 3
public float G
{
set
{
Tizen.Log.Fatal("NUI", "Please do not use this setter, Deprecated in API8, will be removed in API10. please use new Vector4(...) constructor");
Interop.Vector4.GSet(SwigCPtr, value);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
callback?.Invoke(X, Y, Z, W);
}
get
{
float ret = Interop.Vector4.GGet(SwigCPtr);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw new InvalidOperationException("FATAL: get Exception", NDalicPINVOKE.SWIGPendingException.Retrieve());
return ret;
}
}
///
/// The t component.
///
///
/// The setter is deprecated in API8 and will be removed in API10. Please use new Vector4(...) constructor.
///
///
/// // DO NOT use like the followings!
/// Vector4 vector4 = new Vector4();
/// vector4.T = 0.5f;
/// // Please USE like this
/// float s = 0.1f, t = 0.5f, p = 0.9f, q = 1.0f;
/// Vector4 vector4 = new Vector4(s, t, p, q);
///
/// 3
public float T
{
set
{
Tizen.Log.Fatal("NUI", "Please do not use this setter, Deprecated in API8, will be removed in API10. please use new Vector4(...) constructor");
Interop.Vector4.TSet(SwigCPtr, value);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
callback?.Invoke(X, Y, Z, W);
}
get
{
float ret = Interop.Vector4.TGet(SwigCPtr);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw new InvalidOperationException("FATAL: get Exception", NDalicPINVOKE.SWIGPendingException.Retrieve());
return ret;
}
}
///
/// The z component.
///
///
/// The setter is deprecated in API8 and will be removed in API10. Please use new Vector4(...) constructor.
///
///
/// // DO NOT use like the followings!
/// Vector4 vector4 = new Vector4();
/// vector4.Z = 0.9f;
/// // Please USE like this
/// float x = 0.1f, y = 0.5f, z = 0.9f, w = 1.0f;
/// Vector4 vector4 = new Vector4(x, y, z, w);
///
/// 3
public float Z
{
set
{
Tizen.Log.Fatal("NUI", "Please do not use this setter, Deprecated in API8, will be removed in API10. please use new Vector4(...) constructor");
Interop.Vector4.ZSet(SwigCPtr, value);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
callback?.Invoke(X, Y, Z, W);
}
get
{
float ret = Interop.Vector4.ZGet(SwigCPtr);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw new InvalidOperationException("FATAL: get Exception", NDalicPINVOKE.SWIGPendingException.Retrieve());
return ret;
}
}
///
/// The blue component.
///
///
/// The setter is deprecated in API8 and will be removed in API10. Please use new Vector4(...) constructor.
///
///
/// // DO NOT use like the followings!
/// Vector4 vector4 = new Vector4();
/// vector4.B = 0.9f;
/// // Please USE like this
/// float r = 0.1f, g = 0.5f, b = 0.9f, a = 1.0f;
/// Vector4 vector4 = new Vector4(r, g, b, a);
///
/// 3
[Obsolete("Please do not use this setter, Deprecated in API8, will be removed in API10. please use new Vector4(...) constructor")]
public float B
{
set
{
Tizen.Log.Fatal("NUI", "Please do not use this setter, Deprecated in API8, will be removed in API10. please use new Vector4(...) constructor");
Interop.Vector4.BSet(SwigCPtr, value);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
callback?.Invoke(X, Y, Z, W);
}
get
{
float ret = Interop.Vector4.BGet(SwigCPtr);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw new InvalidOperationException("FATAL: get Exception", NDalicPINVOKE.SWIGPendingException.Retrieve());
return ret;
}
}
///
/// The p component.
///
///
/// The setter is deprecated in API8 and will be removed in API10. Please use new Vector4(...) constructor.
///
///
/// // DO NOT use like the followings!
/// Vector4 vector4 = new Vector4();
/// vector4.P = 0.9f;
/// // Please USE like this
/// float s = 0.1f, t = 0.5f, p = 0.9f, q = 1.0f;
/// Vector4 vector4 = new Vector4(s, t, p, q);
///
/// 3
public float P
{
set
{
Tizen.Log.Fatal("NUI", "Please do not use this setter, Deprecated in API8, will be removed in API10. please use new Vector4(...) constructor");
Interop.Vector4.PSet(SwigCPtr, value);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
callback?.Invoke(X, Y, Z, W);
}
get
{
float ret = Interop.Vector4.PGet(SwigCPtr);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw new InvalidOperationException("FATAL: get Exception", NDalicPINVOKE.SWIGPendingException.Retrieve());
return ret;
}
}
///
/// The w component.
///
///
/// The setter is deprecated in API8 and will be removed in API10. Please use new Vector4(...) constructor.
///
///
/// // DO NOT use like the followings!
/// Vector4 vector4 = new Vector4();
/// vector4.W = 1.0f;
/// // Please USE like this
/// float x = 0.1f, y = 0.5f, z = 0.9f, w = 1.0f;
/// Vector4 vector4 = new Vector4(x, y, z, w);
///
/// 3
public float W
{
set
{
Tizen.Log.Fatal("NUI", "Please do not use this setter, Deprecated in API8, will be removed in API10. please use new Vector4(...) constructor");
Interop.Vector4.WSet(SwigCPtr, value);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
callback?.Invoke(X, Y, Z, W);
}
get
{
float ret = Interop.Vector4.WGet(SwigCPtr);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw new InvalidOperationException("FATAL: get Exception", NDalicPINVOKE.SWIGPendingException.Retrieve());
return ret;
}
}
///
/// The alpha component.
///
///
/// The setter is deprecated in API8 and will be removed in API10. Please use new Vector4(...) constructor.
///
///
/// // DO NOT use like the followings!
/// Vector4 vector4 = new Vector4();
/// vector4.A = 1.0f;
/// // Please USE like this
/// float r = 0.1f, g = 0.5f, b = 0.9f, a = 1.0f;
/// Vector4 vector4 = new Vector4(r, g, b, a);
///
/// 3
public float A
{
set
{
Tizen.Log.Fatal("NUI", "Please do not use this setter, Deprecated in API8, will be removed in API10. please use new Vector4(...) constructor");
Interop.Vector4.ASet(SwigCPtr, value);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
callback?.Invoke(X, Y, Z, W);
}
get
{
float ret = Interop.Vector4.AGet(SwigCPtr);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw new InvalidOperationException("FATAL: get Exception", NDalicPINVOKE.SWIGPendingException.Retrieve());
return ret;
}
}
///
/// The q component.
///
///
/// The setter is deprecated in API8 and will be removed in API10. Please use new Vector4(...) constructor.
///
///
/// // DO NOT use like the followings!
/// Vector4 vector4 = new Vector4();
/// vector4.Q = 1.0f;
/// // Please USE like this
/// float s = 0.1f, t = 0.5f, p = 0.9f, q = 1.0f;
/// Vector4 vector4 = new Vector4(s, t, p, q);
///
/// 3
public float Q
{
set
{
Tizen.Log.Fatal("NUI", "Please do not use this setter, Deprecated in API8, will be removed in API10. please use new Vector4(...) constructor");
Interop.Vector4.QSet(SwigCPtr, value);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
callback?.Invoke(X, Y, Z, W);
}
get
{
float ret = Interop.Vector4.QGet(SwigCPtr);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw new InvalidOperationException("FATAL: get Exception", NDalicPINVOKE.SWIGPendingException.Retrieve());
return ret;
}
}
///
/// The array subscript operator overload.
///
/// The subscript index.
/// The float at the given index.
/// 3
public float this[uint index]
{
get
{
return ValueOfIndex(index);
}
}
///
/// The addition operator.
///
/// The first value.
/// The second value.
/// The vector containing the result of the addition.
/// 3
public static Vector4 operator +(Vector4 arg1, Vector4 arg2)
{
return arg1?.Add(arg2);
}
///
/// The subtraction operator.
///
/// The first value.
/// The second value.
/// The vector containing the result of the subtraction.
/// 3
public static Vector4 operator -(Vector4 arg1, Vector4 arg2)
{
return arg1?.Subtract(arg2);
}
///
/// The unary negation operator.
///
/// The target value.
/// The vector containing the negation.
/// 3
public static Vector4 operator -(Vector4 arg1)
{
return arg1?.Subtract();
}
///
/// The multiplication operator.
///
/// The first value.
/// The second value.
/// The vector containing the result of the multiplication.
/// 3
public static Vector4 operator *(Vector4 arg1, Vector4 arg2)
{
return arg1?.Multiply(arg2);
}
///
/// The multiplication operator.
///
/// The first value.
/// The float value to scale the vector.
/// The vector containing the result of scaling.
/// 3
public static Vector4 operator *(Vector4 arg1, float arg2)
{
return arg1?.Multiply(arg2);
}
///
/// The division operator.
///
/// The first value.
/// The second value.
/// The vector containing the result of the division.
/// 3
public static Vector4 operator /(Vector4 arg1, Vector4 arg2)
{
return arg1?.Divide(arg2);
}
///
/// The division operator.
///
/// The first value.
/// The float value to scale the vector by.
/// The vector containing the result of scaling.
/// 3
public static Vector4 operator /(Vector4 arg1, float arg2)
{
return arg1?.Divide(arg2);
}
///
/// Determines whether the specified object is equal to the current object.
///
/// The object to compare with the current object.
/// true if the specified object is equal to the current object; otherwise, false.
public override bool Equals(System.Object obj)
{
Vector4 vector4 = obj as Vector4;
bool equal = false;
if (X == vector4?.X && Y == vector4?.Y && Z == vector4?.Z && W == vector4?.W)
{
equal = true;
}
return equal;
}
///
/// Gets the the hash code of this Vector4.
///
/// The Hash Code.
/// 6
public override int GetHashCode()
{
return SwigCPtr.Handle.GetHashCode();
}
///
/// Returns the length of the vector.
///
/// The length.
/// 3
public float Length()
{
float ret = Interop.Vector4.Length(SwigCPtr);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
///
/// Returns the length of the vector squared.
/// This is faster than using Length() when performing
/// threshold checks as it avoids use of the square root.
///
/// The length of the vector squared.
/// 3
public float LengthSquared()
{
float ret = Interop.Vector4.LengthSquared(SwigCPtr);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
///
/// Normalizes the vector.
/// Sets the vector to unit length whilst maintaining its direction.
///
/// 3
public void Normalize()
{
Interop.Vector4.Normalize(SwigCPtr);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
}
///
/// Clamps the vector between minimum and maximum vectors.
///
/// The minimum vector.
/// The maximum vector.
/// 3
public void Clamp(Vector4 min, Vector4 max)
{
Interop.Vector4.Clamp(SwigCPtr, Vector4.getCPtr(min), Vector4.getCPtr(max));
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
}
///
[EditorBrowsable(EditorBrowsableState.Never)]
public object Clone() => new Vector4(X, Y, Z, W);
internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Vector4 obj)
{
return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.SwigCPtr;
}
internal static Vector4 GetVector4FromPtr(global::System.IntPtr cPtr)
{
Vector4 ret = new Vector4(cPtr, false);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
internal SWIGTYPE_p_float AsFloat()
{
global::System.IntPtr cPtr = Interop.Vector4.AsFloat(SwigCPtr);
SWIGTYPE_p_float ret = (cPtr == global::System.IntPtr.Zero) ? null : new SWIGTYPE_p_float(cPtr);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
internal float Dot(Vector3 other)
{
float ret = Interop.Vector4.DotWithVector3(SwigCPtr, Vector3.getCPtr(other));
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
internal float Dot(Vector4 other)
{
float ret = Interop.Vector4.Dot(SwigCPtr, Vector4.getCPtr(other));
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
internal float Dot4(Vector4 other)
{
float ret = Interop.Vector4.Dot4(SwigCPtr, Vector4.getCPtr(other));
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
internal Vector4 Cross(Vector4 other)
{
Vector4 ret = new Vector4(Interop.Vector4.Cross(SwigCPtr, Vector4.getCPtr(other)), true);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
/// This will not be public opened.
[EditorBrowsable(EditorBrowsableState.Never)]
protected override void ReleaseSwigCPtr(System.Runtime.InteropServices.HandleRef swigCPtr)
{
Interop.Vector4.DeleteVector4(swigCPtr);
}
private Vector4 Add(Vector4 rhs)
{
Vector4 ret = new Vector4(Interop.Vector4.Add(SwigCPtr, Vector4.getCPtr(rhs)), true);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
private Vector4 AddAssign(Vector4 rhs)
{
Vector4 ret = new Vector4(Interop.Vector4.AddAssign(SwigCPtr, Vector4.getCPtr(rhs)), false);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
private Vector4 Subtract(Vector4 rhs)
{
Vector4 ret = new Vector4(Interop.Vector4.Subtract(SwigCPtr, Vector4.getCPtr(rhs)), true);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
private Vector4 SubtractAssign(Vector4 rhs)
{
Vector4 ret = new Vector4(Interop.Vector4.SubtractAssign(SwigCPtr, Vector4.getCPtr(rhs)), false);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
private Vector4 Multiply(Vector4 rhs)
{
Vector4 ret = new Vector4(Interop.Vector4.Multiply(SwigCPtr, Vector4.getCPtr(rhs)), true);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
private Vector4 Multiply(float rhs)
{
Vector4 ret = new Vector4(Interop.Vector4.Multiply(SwigCPtr, rhs), true);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
private Vector4 MultiplyAssign(Vector4 rhs)
{
Vector4 ret = new Vector4(Interop.Vector4.MultiplyAssign(SwigCPtr, Vector4.getCPtr(rhs)), false);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
private Vector4 MultiplyAssign(float rhs)
{
Vector4 ret = new Vector4(Interop.Vector4.MultiplyAssign(SwigCPtr, rhs), false);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
private Vector4 Divide(Vector4 rhs)
{
Vector4 ret = new Vector4(Interop.Vector4.Divide(SwigCPtr, Vector4.getCPtr(rhs)), true);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
private Vector4 Divide(float rhs)
{
Vector4 ret = new Vector4(Interop.Vector4.Divide(SwigCPtr, rhs), true);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
private Vector4 DivideAssign(Vector4 rhs)
{
Vector4 ret = new Vector4(Interop.Vector4.DivideAssign(SwigCPtr, Vector4.getCPtr(rhs)), false);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
private Vector4 DivideAssign(float rhs)
{
Vector4 ret = new Vector4(Interop.Vector4.DivideAssign(SwigCPtr, rhs), false);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
private Vector4 Subtract()
{
Vector4 ret = new Vector4(Interop.Vector4.Subtract(SwigCPtr), true);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
private bool EqualTo(Vector4 rhs)
{
bool ret = Interop.Vector4.EqualTo(SwigCPtr, Vector4.getCPtr(rhs));
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
private bool NotEqualTo(Vector4 rhs)
{
bool ret = Interop.Vector4.NotEqualTo(SwigCPtr, Vector4.getCPtr(rhs));
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
private float ValueOfIndex(uint index)
{
float ret = Interop.Vector4.ValueOfIndex(SwigCPtr, index);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
}
}