/* * 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 Tizen.NUI.Binding; using System.ComponentModel; namespace Tizen.NUI { /// /// Position is a three-dimensional vector. /// /// 3 [Tizen.NUI.Binding.TypeConverter(typeof(PositionTypeConverter))] public class Position : Disposable { /// /// The constructor. /// /// /// Position2D and Position are implicitly converted to each other, so these are compatible and can be replaced without any type casting.
/// For example, the followings are possible.
/// view.Position2D = new Position(10.0f, 10.0f, 10.0f); // be aware that here the z value(10.0f) will be lost.
/// view.Position = new Position2D(10, 10); // be aware that here the z value is 0.0f by default.
///
/// 3 public Position() : this(Interop.Vector3.new_Vector3__SWIG_0(), true) { if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } /// /// The constructor. /// /// The x component. /// The y component. /// The z component(optional). /// /// Position2D and Position are implicitly converted to each other, so these are compatible and can be replaced without any type casting.
/// For example, the followings are possible.
/// view.Position2D = new Position(10.0f, 10.0f, 10.0f); // be aware that here the z value(10.0f) will be lost.
/// view.Position = new Position2D(10, 10); // be aware that here the z value is 0.0f by default.
///
/// 3 public Position(float x, float y, float z = 0.0f) : this(Interop.Vector3.new_Vector3__SWIG_1(x, y, z), true) { if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } /// /// The constructor. /// /// Position2D to create this vector from. /// 3 public Position(Position2D position2d) : this(Interop.Vector3.new_Vector3__SWIG_3(Position2D.getCPtr(position2d)), true) { if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } internal Position(global::System.IntPtr cPtr, bool cMemoryOwn) : base(cPtr, cMemoryOwn) { } /// /// ParentOrigin constants. It's 0.0. /// /// 3 public static float ParentOriginTop { get { float ret = Interop.NDalicParentOrigin.ParentOriginTop_get(); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; } } /// /// ParentOrigin constants. It's 1.0. /// /// 3 public static float ParentOriginBottom { get { float ret = Interop.NDalicParentOrigin.ParentOriginBottom_get(); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; } } /// /// ParentOrigin constants. It's 0.0. /// /// 3 public static float ParentOriginLeft { get { float ret = Interop.NDalicParentOrigin.ParentOriginLeft_get(); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; } } /// /// ParentOrigin constants. It's 1.0. /// /// 3 public static float ParentOriginRight { get { float ret = Interop.NDalicParentOrigin.ParentOriginRight_get(); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; } } /// /// ParentOrigin constants. It's 0.5. /// /// 3 public static float ParentOriginMiddle { get { float ret = Interop.NDalicParentOrigin.ParentOriginMiddle_get(); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; } } /// /// ParentOrigin constants: 0.0, 0.0, 0.5. /// /// 3 public static Position ParentOriginTopLeft { get { global::System.IntPtr cPtr = Interop.NDalicParentOrigin.ParentOriginTopLeft_get(); Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; } } /// /// ParentOrigin constants: 0.5, 0.0, 0.5. /// /// 3 public static Position ParentOriginTopCenter { get { global::System.IntPtr cPtr = Interop.NDalicParentOrigin.ParentOriginTopCenter_get(); Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; } } /// /// ParentOrigin constants: 1.0, 0.0, 0.5. /// /// 3 public static Position ParentOriginTopRight { get { global::System.IntPtr cPtr = Interop.NDalicParentOrigin.ParentOriginTopRight_get(); Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; } } /// /// ParentOrigin constants: 0.0, 0.5, 0.5. /// /// 3 public static Position ParentOriginCenterLeft { get { global::System.IntPtr cPtr = Interop.NDalicParentOrigin.ParentOriginCenterLeft_get(); Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; } } /// /// ParentOrigin constants: 0.0, 0.5, 0.5 /// /// 3 public static Position ParentOriginCenter { get { global::System.IntPtr cPtr = Interop.NDalicParentOrigin.ParentOriginCenter_get(); Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; } } /// /// ParentOrigin constants: 1.0, 0.5, 0.5. /// /// 3 public static Position ParentOriginCenterRight { get { global::System.IntPtr cPtr = Interop.NDalicParentOrigin.ParentOriginCenterRight_get(); Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; } } /// /// ParentOrigin constants: 0.0f, 1.0f, 0.5f. /// /// 3 public static Position ParentOriginBottomLeft { get { global::System.IntPtr cPtr = Interop.NDalicParentOrigin.ParentOriginBottomLeft_get(); Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; } } /// /// ParentOrigin constants: 0.5, 1.0, 0.5. /// /// 3 public static Position ParentOriginBottomCenter { get { global::System.IntPtr cPtr = Interop.NDalicParentOrigin.ParentOriginBottomCenter_get(); Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; } } /// /// ParentOrigin constants: 1.0, 1.0, 0.5. /// /// 3 public static Position ParentOriginBottomRight { get { global::System.IntPtr cPtr = Interop.NDalicParentOrigin.ParentOriginBottomRight_get(); Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; } } /// /// PivotPoint constants: 0.0. /// /// 3 public static float PivotPointTop { get { float ret = Interop.NDalicAnchorPoint.AnchorPointTop_get(); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; } } /// /// PivotPoint constants: 1.0. /// /// 3 public static float PivotPointBottom { get { float ret = Interop.NDalicAnchorPoint.AnchorPointBottom_get(); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; } } /// /// PivotPoint constants: 0.0. /// /// 3 public static float PivotPointLeft { get { float ret = Interop.NDalicAnchorPoint.AnchorPointLeft_get(); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; } } /// /// PivotPoint constants: 1.0. /// /// 3 public static float PivotPointRight { get { float ret = Interop.NDalicAnchorPoint.AnchorPointRight_get(); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; } } /// /// PivotPoint constants: 0.0. /// /// 3 public static float PivotPointMiddle { get { float ret = Interop.NDalicAnchorPoint.AnchorPointMiddle_get(); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; } } /// /// PivotPoint constants: 0.0, 0.0, 0.5. /// /// 3 public static Position PivotPointTopLeft { get { global::System.IntPtr cPtr = Interop.NDalicAnchorPoint.AnchorPointTopLeft_get(); Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; } } /// /// PivotPoint constants: 0.5, 0.0, 0.5. /// /// 3 public static Position PivotPointTopCenter { get { global::System.IntPtr cPtr = Interop.NDalicAnchorPoint.AnchorPointTopCenter_get(); Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; } } /// /// PivotPoint constants: 1.0, 0.0, 0.5. /// /// 3 public static Position PivotPointTopRight { get { global::System.IntPtr cPtr = Interop.NDalicAnchorPoint.AnchorPointTopRight_get(); Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; } } /// /// PivotPoint constants: 0.0, 0.5, 0.5. /// /// 3 public static Position PivotPointCenterLeft { get { global::System.IntPtr cPtr = Interop.NDalicAnchorPoint.AnchorPointCenterLeft_get(); Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; } } /// /// PivotPoint constants: 0.5, 0.5, 0.5. /// /// 3 public static Position PivotPointCenter { get { global::System.IntPtr cPtr = Interop.NDalicAnchorPoint.AnchorPointCenter_get(); Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; } } /// /// PivotPoint constants: 1.0, 0.5, 0.5. /// /// 3 public static Position PivotPointCenterRight { get { global::System.IntPtr cPtr = Interop.NDalicAnchorPoint.AnchorPointCenterRight_get(); Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; } } /// /// PivotPoint constants: 0.0, 1.0, 0.5. /// /// 3 public static Position PivotPointBottomLeft { get { global::System.IntPtr cPtr = Interop.NDalicAnchorPoint.AnchorPointBottomLeft_get(); Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; } } /// /// PivotPoint constants: 0.5, 1.0, 0.5 /// /// 3 public static Position PivotPointBottomCenter { get { global::System.IntPtr cPtr = Interop.NDalicAnchorPoint.AnchorPointBottomCenter_get(); Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; } } /// /// PivotPoint constants: 1.0, 1.0, 0.5. /// /// 3 public static Position PivotPointBottomRight { get { global::System.IntPtr cPtr = Interop.NDalicAnchorPoint.AnchorPointBottomRight_get(); Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; } } /// /// Constant ( 1.0f, 1.0f, 1.0f ). /// /// 3 public static Position One { get { global::System.IntPtr cPtr = Interop.Vector3.Vector3_ONE_get(); Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; } } /// /// Constant ( 0.0f, 0.0f, 0.0f ). /// /// 3 public static Position Zero { get { global::System.IntPtr cPtr = Interop.Vector3.Vector3_ZERO_get(); Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; } } /// /// The x component. /// /// 3 public float X { set { Interop.Vector3.Vector3_X_set(swigCPtr, value); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); callback?.Invoke(X, Y, Z); } get { float ret = Interop.Vector3.Vector3_X_get(swigCPtr); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; } } /// /// The y component. /// /// 3 public float Y { set { Interop.Vector3.Vector3_Y_set(swigCPtr, value); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); callback?.Invoke(X, Y, Z); } get { float ret = Interop.Vector3.Vector3_Y_get(swigCPtr); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; } } /// /// The z component. /// /// 3 public float Z { set { Interop.Vector3.Vector3_Z_set(swigCPtr, value); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); callback?.Invoke(X, Y, Z); } get { float ret = Interop.Vector3.Vector3_Z_get(swigCPtr); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; } } internal static Position XAxis { get { global::System.IntPtr cPtr = Interop.Vector3.Vector3_XAXIS_get(); Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; } } internal static Position YAxis { get { global::System.IntPtr cPtr = Interop.Vector3.Vector3_YAXIS_get(); Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; } } internal static Position ZAxis { get { global::System.IntPtr cPtr = Interop.Vector3.Vector3_ZAXIS_get(); Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; } } internal static Position NegativeXAxis { get { global::System.IntPtr cPtr = Interop.Vector3.Vector3_NEGATIVE_XAXIS_get(); Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; } } internal static Position NegativeYAxis { get { global::System.IntPtr cPtr = Interop.Vector3.Vector3_NEGATIVE_YAXIS_get(); Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; } } internal static Position NegativeZAxis { get { global::System.IntPtr cPtr = Interop.Vector3.Vector3_NEGATIVE_ZAXIS_get(); Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; } } /// /// The const array subscript operator overload. Should be 0, 1, or 2. /// /// The subscript index. /// The float at the given index. /// 3 public float this[uint index] { get { return ValueOfIndex(index); } } /// /// An addition operator. /// /// The vector to add. /// The vector to add. /// The vector containing the result of the addition. /// 3 public static Position operator +(Position arg1, Position arg2) { return arg1.Add(arg2); } /// /// The subtraction operator. /// /// The vector to subtract. /// The vector to subtract. /// The vector containing the result of the subtraction. /// 3 public static Position operator -(Position arg1, Position arg2) { return arg1.Subtract(arg2); } /// /// The unary negation operator. /// /// The vector to negate. /// The vector containg the negation. /// 3 public static Position operator -(Position arg1) { return arg1.Subtract(); } /// /// The multiplication operator. /// /// The vector to multiply. /// The vector to multiply. /// The vector containing the result of the multiplication. /// 3 public static Position operator *(Position arg1, Position arg2) { return arg1.Multiply(arg2); } /// /// The multiplication operator. /// /// The vector to multiply /// The float value to scale the vector. /// The vector containing the result of scaling. /// 3 public static Position operator *(Position arg1, float arg2) { return arg1.Multiply(arg2); } /// /// The division operator. /// /// The vector to divide. /// The vector to divide. /// The vector containing the result of the division. /// 3 public static Position operator /(Position arg1, Position arg2) { return arg1.Divide(arg2); } /// /// The division operator. /// /// The vector to divide. /// The float value to scale the vector by. /// The vector containing the result of scaling. /// 3 public static Position operator /(Position arg1, float arg2) { return arg1.Divide(arg2); } /// /// Converts a position instance to a Vector3 instance. /// /// 3 public static implicit operator Vector3(Position Position) { return new Vector3(Position.X, Position.Y, Position.Z); } /// /// Converts a Vector3 instance to a position instance. /// /// 3 public static implicit operator Position(Vector3 vec) { return new Position(vec.X, vec.Y, vec.Z); } /// /// Implicit type cast operator, Position2D to Position /// /// The object of Position2D type. /// none /// This will be public opened in tizen_next by ACR. [EditorBrowsable(EditorBrowsableState.Never)] public static implicit operator Position(Position2D position2d) { return new Position(position2d.X, position2d.Y, 0); } /// /// 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) { Position position = obj as Position; bool equal = false; if (X == position?.X && Y == position?.Y && Z == position?.Z) { equal = true; } return equal; } /// /// Gets the the hash code of this Position. /// /// The Hash Code. /// 6 public override int GetHashCode() { return swigCPtr.Handle.GetHashCode(); } /// /// Compares if rhs is equal to. /// /// The vector to compare. /// Returns true if the two vectors are equal, otherwise false. /// 3 public bool EqualTo(Position rhs) { bool ret = Interop.Vector3.Vector3_EqualTo(swigCPtr, Position.getCPtr(rhs)); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; } /// /// Compares if rhs is not equal to. /// /// The vector to compare. /// Returns true if the two vectors are not equal, otherwise false. /// 3 public bool NotEqualTo(Position rhs) { bool ret = Interop.Vector3.Vector3_NotEqualTo(swigCPtr, Position.getCPtr(rhs)); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; } internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Position obj) { return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } internal static Position GetPositionFromPtr(global::System.IntPtr cPtr) { Position ret = new Position(cPtr, false); 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.delete_Vector3(swigCPtr); } private Position Add(Position rhs) { Position ret = new Position(Interop.Vector3.Vector3_Add(swigCPtr, Position.getCPtr(rhs)), true); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; } private Position Subtract(Position rhs) { Position ret = new Position(Interop.Vector3.Vector3_Subtract__SWIG_0(swigCPtr, Position.getCPtr(rhs)), true); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; } private Position Multiply(Position rhs) { Position ret = new Position(Interop.Vector3.Vector3_Multiply__SWIG_0(swigCPtr, Position.getCPtr(rhs)), true); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; } private Position Multiply(float rhs) { Position ret = new Position(Interop.Vector3.Vector3_Multiply__SWIG_1(swigCPtr, rhs), true); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; } private Position Divide(Position rhs) { Position ret = new Position(Interop.Vector3.Vector3_Divide__SWIG_0(swigCPtr, Position.getCPtr(rhs)), true); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; } private Position Divide(float rhs) { Position ret = new Position(Interop.Vector3.Vector3_Divide__SWIG_1(swigCPtr, rhs), true); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; } private Position Subtract() { Position ret = new Position(Interop.Vector3.Vector3_Subtract__SWIG_1(swigCPtr), true); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; } private float ValueOfIndex(uint index) { float ret = Interop.Vector3.Vector3_ValueOfIndex__SWIG_0(swigCPtr, index); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; } internal delegate void PositionChangedCallback(float x, float y, float z); internal Position(PositionChangedCallback cb, float x, float y, float z) : this(Interop.Vector3.new_Vector3__SWIG_1(x, y, z), true) { callback = cb; if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } private PositionChangedCallback callback = null; } }