/*
* 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 three-dimensional vector.
///
/// 3
[Binding.TypeConverter(typeof(Vector3TypeConverter))]
public class Vector3 : Disposable, ICloneable
{
///
/// The constructor.
///
/// 3
public Vector3() : this(Interop.Vector3.NewVector3(), true)
{
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
}
///
/// The default constructor initializes the vector to 0.
///
/// The x (or width) component.
/// The y (or height) component.
/// The z (or depth) component.
/// 3
public Vector3(float x, float y, float z) : this(Interop.Vector3.NewVector3(x, y, z), true)
{
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
}
///
/// Conversion constructor from an array of three floats.
///
/// An array of xyz.
/// 3
public Vector3(float[] array) : this(Interop.Vector3.NewVector3(array), true)
{
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
}
///
/// The constructor.
///
/// Vector2 to create this vector from.
/// 3
public Vector3(Vector2 vec2) : this(Interop.Vector3.NewVector3WithVector2(Vector2.getCPtr(vec2)), true)
{
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
}
///
/// The constructor.
///
/// Vector4 to create this vector from.
/// 3
public Vector3(Vector4 vec4) : this(Interop.Vector3.NewVector3WithVector4(Vector4.getCPtr(vec4)), true)
{
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
}
internal Vector3(global::System.IntPtr cPtr, bool cMemoryOwn) : base(cPtr, cMemoryOwn)
{
}
internal Vector3(Vector3ChangedCallback cb, float x, float y, float z) : this(Interop.Vector3.NewVector3(x, y, z), true)
{
callback = cb;
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
}
internal delegate void Vector3ChangedCallback(float x, float y, float z);
private Vector3ChangedCallback callback = null;
///
/// (1.0f,1.0f,1.0f).
///
/// 3
public static Vector3 One
{
get
{
global::System.IntPtr cPtr = Interop.Vector3.OneGet();
Vector3 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector3(cPtr, false);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw new InvalidOperationException("FATAL: get Exception", NDalicPINVOKE.SWIGPendingException.Retrieve());
return ret;
}
}
///
/// The vector representing the x-axis.
///
/// 3
public static Vector3 XAxis
{
get
{
global::System.IntPtr cPtr = Interop.Vector3.XaxisGet();
Vector3 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector3(cPtr, false);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw new InvalidOperationException("FATAL: get Exception", NDalicPINVOKE.SWIGPendingException.Retrieve());
return ret;
}
}
///
/// The vector representing the y-axis.
///
/// 3
public static Vector3 YAxis
{
get
{
global::System.IntPtr cPtr = Interop.Vector3.YaxisGet();
Vector3 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector3(cPtr, false);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw new InvalidOperationException("FATAL: get Exception", NDalicPINVOKE.SWIGPendingException.Retrieve());
return ret;
}
}
///
/// The vector representing the z-axis.
///
/// 3
public static Vector3 ZAxis
{
get
{
global::System.IntPtr cPtr = Interop.Vector3.ZaxisGet();
Vector3 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector3(cPtr, false);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw new InvalidOperationException("FATAL: get Exception", NDalicPINVOKE.SWIGPendingException.Retrieve());
return ret;
}
}
///
/// The vector representing the negative x-axis.
///
/// 3
public static Vector3 NegativeXAxis
{
get
{
global::System.IntPtr cPtr = Interop.Vector3.NegativeXaxisGet();
Vector3 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector3(cPtr, false);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw new InvalidOperationException("FATAL: get Exception", NDalicPINVOKE.SWIGPendingException.Retrieve());
return ret;
}
}
///
/// Th vector representing the negative y-axis.
///
/// 3
public static Vector3 NegativeYAxis
{
get
{
global::System.IntPtr cPtr = Interop.Vector3.NegativeYaxisGet();
Vector3 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector3(cPtr, false);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw new InvalidOperationException("FATAL: get Exception", NDalicPINVOKE.SWIGPendingException.Retrieve());
return ret;
}
}
///
/// The vector representing the negative z-axis.
///
/// 3
public static Vector3 NegativeZAxis
{
get
{
global::System.IntPtr cPtr = Interop.Vector3.NegativeZaxisGet();
Vector3 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector3(cPtr, false);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw new InvalidOperationException("FATAL: get Exception", NDalicPINVOKE.SWIGPendingException.Retrieve());
return ret;
}
}
///
/// (0.0f, 0.0f, 0.0f).
///
/// 3
public static Vector3 Zero
{
get
{
global::System.IntPtr cPtr = Interop.Vector3.ZeroGet();
Vector3 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector3(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 Vector3(...) constructor.
///
///
/// // DO NOT use like the followings!
/// Vector3 vector3 = new Vector3();
/// vector3.X = 0.1f;
/// // Please USE like this
/// float x = 0.1f, y = 0.5f, z = 0.9f;
/// Vector3 vector3 = new Vector3(x, y, z);
///
/// 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 Vector3(...) constructor");
Interop.Vector3.XSet(SwigCPtr, value);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
callback?.Invoke(X, Y, Z);
}
get
{
float ret = Interop.Vector3.XGet(SwigCPtr);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw new InvalidOperationException("FATAL: get Exception", NDalicPINVOKE.SWIGPendingException.Retrieve());
return ret;
}
}
///
/// The width component.
///
///
/// The setter is deprecated in API8 and will be removed in API10. Please use new Vector3(...) constructor.
///
///
/// // DO NOT use like the followings!
/// Vector3 vector3 = new Vector3();
/// vector3.Width = 1.0f;
/// // Please USE like this
/// float width = 1.0f, height = 2.0f, depth = 3.0f;
/// Vector3 vector3 = new Vector3(width, height, depth);
///
/// 3
[Obsolete("Please do not use this setter, Deprecated in API8, will be removed in API10. please use new Vector3(...) constructor")]
public float Width
{
set
{
Tizen.Log.Fatal("NUI", "Please do not use this setter, Deprecated in API8, will be removed in API10. please use new Vector3(...) constructor");
Interop.Vector3.WidthSet(SwigCPtr, value);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
callback?.Invoke(X, Y, Z);
}
get
{
float ret = Interop.Vector3.WidthGet(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 Vector3(...) constructor.
///
///
/// // DO NOT use like the followings!
/// Vector3 vector3 = new Vector3();
/// vector3.R = 0.1f;
/// // Please USE like this
/// float r = 0.1f, g = 0.5f, b = 0.9f;
/// Vector3 vector3 = new Vector3(r, g, b);
///
/// 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 Vector3(...) constructor");
Interop.Vector3.RSet(SwigCPtr, value);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
callback?.Invoke(X, Y, Z);
}
get
{
float ret = Interop.Vector3.RGet(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 Vector3(...) constructor.
///
///
/// // DO NOT use like the followings!
/// Vector3 vector3 = new Vector3();
/// vector3.Y = 0.5f;
/// // Please USE like this
/// float x = 0.1f, y = 0.5f, z = 0.9f;
/// Vector3 vector3 = new Vector3(x, y, z);
///
/// 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 Vector3(...) constructor");
Interop.Vector3.YSet(SwigCPtr, value);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
callback?.Invoke(X, Y, Z);
}
get
{
float ret = Interop.Vector3.YGet(SwigCPtr);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw new InvalidOperationException("FATAL: get Exception", NDalicPINVOKE.SWIGPendingException.Retrieve());
return ret;
}
}
///
/// The height component.
///
///
/// The setter is deprecated in API8 and will be removed in API10. Please use new Vector3(...) constructor.
///
///
/// // DO NOT use like the followings!
/// Vector3 vector3 = new Vector3();
/// vector3.Height = 2.0f;
/// // Please USE like this
/// float width = 1.0f, height = 2.0f, depth = 3.0f;
/// Vector3 vector3 = new Vector3(width, height, depth);
///
/// 3
public float Height
{
set
{
Tizen.Log.Fatal("NUI", "Please do not use this setter, Deprecated in API8, will be removed in API10. please use new Vector3(...) constructor");
Interop.Vector3.HeightSet(SwigCPtr, value);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
callback?.Invoke(X, Y, Z);
}
get
{
float ret = Interop.Vector3.HeightGet(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 Vector3(...) constructor.
///
///
/// // DO NOT use like the followings!
/// Vector3 vector3 = new Vector3();
/// vector3.G = 0.5f;
/// // Please USE like this
/// float r = 0.1f, g = 0.5f, b = 0.9f;
/// Vector3 vector3 = new Vector3(r, g, b);
///
/// 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 Vector3(...) constructor");
Interop.Vector3.GSet(SwigCPtr, value);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
callback?.Invoke(X, Y, Z);
}
get
{
float ret = Interop.Vector3.GGet(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 Vector3(...) constructor.
///
///
/// // DO NOT use like the followings!
/// Vector3 vector3 = new Vector3();
/// vector3.Z = 0.9f;
/// // Please USE like this
/// float x = 0.1f, y = 0.5f, z = 0.9f;
/// Vector3 vector3 = new Vector3(x, y, z);
///
/// 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 Vector3(...) constructor");
Interop.Vector3.ZSet(SwigCPtr, value);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
callback?.Invoke(X, Y, Z);
}
get
{
float ret = Interop.Vector3.ZGet(SwigCPtr);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw new InvalidOperationException("FATAL: get Exception", NDalicPINVOKE.SWIGPendingException.Retrieve());
return ret;
}
}
///
/// The depth component.
///
///
/// The setter is deprecated in API8 and will be removed in API10. Please use new Vector3(...) constructor.
///
///
/// // DO NOT use like the followings!
/// Vector3 vector3 = new Vector3();
/// vector3.Depth = 3.0f;
/// // Please USE like this
/// float width = 1.0f, height = 2.0f, depth = 3.0f;
/// Vector3 vector3 = new Vector3(width, height, depth);
///
/// 3
[Obsolete("Please do not use this setter, Deprecated in API8, will be removed in API10. please use new Vector3(...) constructor")]
public float Depth
{
set
{
Tizen.Log.Fatal("NUI", "Please do not use this setter, Deprecated in API8, will be removed in API10. please use new Vector3(...) constructor");
Interop.Vector3.DepthSet(SwigCPtr, value);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
callback?.Invoke(X, Y, Z);
}
get
{
float ret = Interop.Vector3.DepthGet(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 Vector3(...) constructor.
///
///
/// // DO NOT use like the followings!
/// Vector3 vector3 = new Vector3();
/// vector3.B = 0.9f;
/// // Please USE like this
/// float r = 0.1f, g = 0.5f, b = 0.9f;
/// Vector3 vector3 = new Vector3(r, g, b);
///
/// 3
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 Vector3(...) constructor");
Interop.Vector3.BSet(SwigCPtr, value);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
callback?.Invoke(X, Y, Z);
}
get
{
float ret = Interop.Vector3.BGet(SwigCPtr);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw new InvalidOperationException("FATAL: get Exception", NDalicPINVOKE.SWIGPendingException.Retrieve());
return ret;
}
}
///
/// An 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 Vector3 operator +(Vector3 arg1, Vector3 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 Vector3 operator -(Vector3 arg1, Vector3 arg2)
{
return arg1?.Subtract(arg2);
}
///
/// The unary negation operator.
///
/// The target value.
/// The vector containg the negation.
/// 3
public static Vector3 operator -(Vector3 arg1)
{
return arg1?.Subtract();
}
///
/// The multiplication operator.
///
/// The first value.
/// The second value.
/// The vector containing the result of the multiplication.
/// 3
public static Vector3 operator *(Vector3 arg1, Vector3 arg2)
{
return arg1?.Multiply(arg2);
}
///
/// The multiplication operator.
///
/// The first value.
/// The float value to scale the vector.
/// The vector containing the result of the scaling.
/// 3
public static Vector3 operator *(Vector3 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 Vector3 operator /(Vector3 arg1, Vector3 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 the scaling.
/// 3
public static Vector3 operator /(Vector3 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)
{
Vector3 vector3 = obj as Vector3;
bool equal = false;
if (X == vector3?.X && Y == vector3?.Y && Z == vector3?.Z)
{
equal = true;
}
return equal;
}
///
/// Gets the the hash code of this Vector3.
///
/// The Hash Code.
/// 6
public override int GetHashCode()
{
return SwigCPtr.Handle.GetHashCode();
}
///
/// Returns the length of the vector.
///
/// The length of the vector.
/// 3
public float Length()
{
float ret = Interop.Vector3.Length(SwigCPtr);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
///
/// Returns the length of the vector squared.
/// This is more efficient than Length() for threshold
/// testing as it avoids the use of a square root.
///
/// The length of the vector squared.
/// 3
public float LengthSquared()
{
float ret = Interop.Vector3.LengthSquared(SwigCPtr);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
///
/// Sets the vector to be unit length, whilst maintaining its direction.
///
/// 3
public void Normalize()
{
Interop.Vector3.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(Vector3 min, Vector3 max)
{
Interop.Vector3.Clamp(SwigCPtr, Vector3.getCPtr(min), Vector3.getCPtr(max));
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
}
///
/// Returns the x and y components (or width and height, or r and g) as a Vector2.
///
/// The partial vector contents as Vector2 (x,y).
/// 3
public Vector2 GetVectorXY()
{
Vector2 ret = new Vector2(Interop.Vector3.GetVectorXY(SwigCPtr), false);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
///
/// Returns the y and z components (or height and depth, or g and b) as a Vector2.
///
/// The partial vector contents as Vector2 (y,z).
/// 3
public Vector2 GetVectorYZ()
{
Vector2 ret = new Vector2(Interop.Vector3.GetVectorYZ(SwigCPtr), false);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
///
[EditorBrowsable(EditorBrowsableState.Never)]
public object Clone() => new Vector3(X, Y, Z);
internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Vector3 obj)
{
return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.SwigCPtr;
}
internal static Vector3 GetVector3FromPtr(global::System.IntPtr cPtr)
{
Vector3 ret = new Vector3(cPtr, false);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
internal SWIGTYPE_p_float AsFloat()
{
global::System.IntPtr cPtr = Interop.Vector3.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;
}
/// This will not be public opened.
[EditorBrowsable(EditorBrowsableState.Never)]
protected override void ReleaseSwigCPtr(System.Runtime.InteropServices.HandleRef swigCPtr)
{
Interop.Vector3.DeleteVector3(swigCPtr);
}
private Vector3 Add(Vector3 rhs)
{
Vector3 ret = new Vector3(Interop.Vector3.Add(SwigCPtr, Vector3.getCPtr(rhs)), true);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
private Vector3 AddAssign(Vector3 rhs)
{
Vector3 ret = new Vector3(Interop.Vector3.AddAssign(SwigCPtr, Vector3.getCPtr(rhs)), false);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
private Vector3 Subtract(Vector3 rhs)
{
Vector3 ret = new Vector3(Interop.Vector3.Subtract(SwigCPtr, Vector3.getCPtr(rhs)), true);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
private Vector3 SubtractAssign(Vector3 rhs)
{
Vector3 ret = new Vector3(Interop.Vector3.SubtractAssign(SwigCPtr, Vector3.getCPtr(rhs)), false);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
private Vector3 Multiply(Vector3 rhs)
{
Vector3 ret = new Vector3(Interop.Vector3.Multiply(SwigCPtr, Vector3.getCPtr(rhs)), true);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
private Vector3 Multiply(float rhs)
{
Vector3 ret = new Vector3(Interop.Vector3.Multiply(SwigCPtr, rhs), true);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
private Vector3 MultiplyAssign(Vector3 rhs)
{
Vector3 ret = new Vector3(Interop.Vector3.MultiplyAssign(SwigCPtr, Vector3.getCPtr(rhs)), false);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
private Vector3 MultiplyAssign(float rhs)
{
Vector3 ret = new Vector3(Interop.Vector3.MultiplyAssign(SwigCPtr, rhs), false);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
private Vector3 MultiplyAssign(Rotation rhs)
{
Vector3 ret = new Vector3(Interop.Vector3.MultiplyAssignQuaternion(SwigCPtr, Rotation.getCPtr(rhs)), false);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
private Vector3 Divide(Vector3 rhs)
{
Vector3 ret = new Vector3(Interop.Vector3.Divide(SwigCPtr, Vector3.getCPtr(rhs)), true);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
private Vector3 Divide(float rhs)
{
Vector3 ret = new Vector3(Interop.Vector3.Divide(SwigCPtr, rhs), true);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
private Vector3 DivideAssign(Vector3 rhs)
{
Vector3 ret = new Vector3(Interop.Vector3.DivideAssign(SwigCPtr, Vector3.getCPtr(rhs)), false);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
private Vector3 DivideAssign(float rhs)
{
Vector3 ret = new Vector3(Interop.Vector3.DivideAssign(SwigCPtr, rhs), false);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
private Vector3 Subtract()
{
Vector3 ret = new Vector3(Interop.Vector3.Subtract(SwigCPtr), true);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
private bool EqualTo(Vector3 rhs)
{
bool ret = Interop.Vector3.EqualTo(SwigCPtr, Vector3.getCPtr(rhs));
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
private bool NotEqualTo(Vector3 rhs)
{
bool ret = Interop.Vector3.NotEqualTo(SwigCPtr, Vector3.getCPtr(rhs));
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
private float ValueOfIndex(uint index)
{
float ret = Interop.Vector3.ValueOfIndex(SwigCPtr, index);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
internal float Dot(Vector3 other)
{
float ret = Interop.Vector3.Dot(SwigCPtr, Vector3.getCPtr(other));
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
internal Vector3 Cross(Vector3 other)
{
Vector3 ret = new Vector3(Interop.Vector3.Cross(SwigCPtr, Vector3.getCPtr(other)), true);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
}
}