-
- internal Vector3(global::System.IntPtr cPtr, bool cMemoryOwn)
- {
- swigCMemOwn = cMemoryOwn;
- swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
- }
-
- 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;
- }
-
- //A Flag to check who called Dispose(). (By User or DisposeQueue)
- private bool isDisposeQueued = false;
-
- /// <summary>
- /// A Flat to check if it is already disposed.
- /// </summary>
- /// <since_tizen> 3 </since_tizen>
- protected bool disposed = false;
-
- /// <summary>
- /// Destructor.
- /// </summary>
- /// <since_tizen> 3 </since_tizen>
- ~Vector3()
- {
- if(!isDisposeQueued)
- {
- isDisposeQueued = true;
- DisposeQueue.Instance.Add(this);
- }
- }
-
- /// <summary>
- /// Dispose.
- /// </summary>
- /// <since_tizen> 3 </since_tizen>
- public void Dispose()
- {
- //Throw excpetion if Dispose() is called in separate thread.
- if (!Window.IsInstalled())
- {
- throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread.");
- }
-
- if (isDisposeQueued)
- {
- Dispose(DisposeTypes.Implicit);
- }
- else
- {
- Dispose(DisposeTypes.Explicit);
- System.GC.SuppressFinalize(this);
- }
- }
-
- /// <summary>
- /// Dispose.
- /// </summary>
- /// <param name="type">The dispose type</param>
- /// <since_tizen> 3 </since_tizen>
- protected virtual void Dispose(DisposeTypes type)
- {
- if (disposed)
- {
- return;
- }
-
- if(type == DisposeTypes.Explicit)
- {
- //Called by User
- //Release your own managed resources here.
- //You should release all of your own disposable objects here.
- }
-
- //Release your own unmanaged resources here.
- //You should not access any managed member here except static instance.
- //because the execution order of Finalizes is non-deterministic.
-
- if (swigCPtr.Handle != global::System.IntPtr.Zero)
- {
- if (swigCMemOwn)
- {
- swigCMemOwn = false;
- NDalicPINVOKE.delete_Vector3(swigCPtr);
- }
- swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
- }
- disposed = true;
- }
-
- /// <summary>
- /// The addition operator.
- /// </summary>
- /// <param name="arg1">The first value.</param>
- /// <param name="arg2">The second value.</param>
- /// <returns>The vector containing the result of the addition.</returns>
- /// <since_tizen> 3 </since_tizen>
- public static Vector3 operator +(Vector3 arg1, Vector3 arg2)
- {
- return arg1.Add(arg2);
- }
-
- /// <summary>
- /// The subtraction operator.
- /// </summary>
- /// <param name="arg1">The first value.</param>
- /// <param name="arg2">The second value.</param>
- /// <returns>The vector containing the result of the subtraction.</returns>
- /// <since_tizen> 3 </since_tizen>
- public static Vector3 operator -(Vector3 arg1, Vector3 arg2)
- {
- return arg1.Subtract(arg2);
- }
-
- /// <summary>
- /// The unary negation operator.
- /// </summary>
- /// <param name="arg1">The target value.</param>
- /// <returns>The vector containg the negation.</returns>
- /// <since_tizen> 3 </since_tizen>
- public static Vector3 operator -(Vector3 arg1)
- {
- return arg1.Subtract();
- }
-
- /// <summary>
- /// The multiplication operator.
- /// </summary>
- /// <param name="arg1">The first value.</param>
- /// <param name="arg2">The second value.</param>
- /// <returns>The vector containing the result of the multiplication.</returns>
- /// <since_tizen> 3 </since_tizen>
- public static Vector3 operator *(Vector3 arg1, Vector3 arg2)
- {
- return arg1.Multiply(arg2);
- }
-
- /// <summary>
- /// The multiplication operator.
- /// </summary>
- /// <param name="arg1">The first value.</param>
- /// <param name="arg2">The float value to scale the vector.</param>
- /// <returns>The vector containing the result of the scaling.</returns>
- /// <since_tizen> 3 </since_tizen>
- public static Vector3 operator *(Vector3 arg1, float arg2)
- {
- return arg1.Multiply(arg2);
- }
-
- /// <summary>
- /// The division operator.
- /// </summary>
- /// <param name="arg1">The first value.</param>
- /// <param name="arg2">The second value.</param>
- /// <returns>The vector containing the result of the division.</returns>
- /// <since_tizen> 3 </since_tizen>
- public static Vector3 operator /(Vector3 arg1, Vector3 arg2)
- {
- return arg1.Divide(arg2);
- }
-
- /// <summary>
- /// The division operator.
- /// </summary>
- /// <param name="arg1">The first value.</param>
- /// <param name="arg2">The float value to scale the vector by.</param>
- /// <returns>The vector containing the result of the scaling.</returns>
- /// <since_tizen> 3 </since_tizen>
- public static Vector3 operator /(Vector3 arg1, float arg2)
- {
- return arg1.Divide(arg2);
- }
-
- /// <summary>
- /// An array subscript operator overload.
- /// </summary>
- /// <param name="index">The subscript index.</param>
- /// <returns>The float at the given index.</returns>
- /// <since_tizen> 3 </since_tizen>
- public float this[uint index]
- {
- get
- {
- return ValueOfIndex(index);
- }
- }
-
- internal static Vector3 GetVector3FromPtr(global::System.IntPtr cPtr)
- {
- Vector3 ret = new Vector3(cPtr, false);
- if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
- return ret;
- }