2 * Copyright (c) 2018 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.
19 using System.ComponentModel;
25 /// Position is a three-dimensional vector.
27 /// <since_tizen> 3 </since_tizen>
28 public class Position : global::System.IDisposable
33 /// <since_tizen> 3 </since_tizen>
34 protected bool swigCMemOwn;
36 /// A Flat to check if it is already disposed.
38 /// <since_tizen> 3 </since_tizen>
39 protected bool disposed = false;
41 private global::System.Runtime.InteropServices.HandleRef swigCPtr;
42 //A Flag to check who called Dispose(). (By User or DisposeQueue)
43 private bool isDisposeQueued = false;
48 /// <since_tizen> 3 </since_tizen>
49 public Position() : this(Interop.Vector3.new_Vector3__SWIG_0(), true)
51 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
57 /// <param name="x">The x component.</param>
58 /// <param name="y">The y component.</param>
59 /// <param name="z">The z component.</param>
60 /// <since_tizen> 3 </since_tizen>
61 public Position(float x, float y, float z) : this(Interop.Vector3.new_Vector3__SWIG_1(x, y, z), true)
63 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
69 /// <param name="position2d">Position2D to create this vector from.</param>
70 /// <since_tizen> 3 </since_tizen>
71 public Position(Position2D position2d) : this(Interop.Vector3.new_Vector3__SWIG_3(Position2D.getCPtr(position2d)), true)
73 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
76 internal Position(global::System.IntPtr cPtr, bool cMemoryOwn)
78 swigCMemOwn = cMemoryOwn;
79 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
86 /// <since_tizen> 3 </since_tizen>
91 isDisposeQueued = true;
92 DisposeQueue.Instance.Add(this);
97 /// ParentOrigin constants. It's 0.0.
99 /// <since_tizen> 3 </since_tizen>
100 public static float ParentOriginTop
104 float ret = Interop.NDalicParentOrigin.ParentOriginTop_get();
105 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
111 /// ParentOrigin constants. It's 1.0.
113 /// <since_tizen> 3 </since_tizen>
114 public static float ParentOriginBottom
118 float ret = Interop.NDalicParentOrigin.ParentOriginBottom_get();
119 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
125 /// ParentOrigin constants. It's 0.0.
127 /// <since_tizen> 3 </since_tizen>
128 public static float ParentOriginLeft
132 float ret = Interop.NDalicParentOrigin.ParentOriginLeft_get();
133 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
139 /// ParentOrigin constants. It's 1.0.
141 /// <since_tizen> 3 </since_tizen>
142 public static float ParentOriginRight
146 float ret = Interop.NDalicParentOrigin.ParentOriginRight_get();
147 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
153 /// ParentOrigin constants. It's 0.5.
155 /// <since_tizen> 3 </since_tizen>
156 public static float ParentOriginMiddle
160 float ret = Interop.NDalicParentOrigin.ParentOriginMiddle_get();
161 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
167 /// ParentOrigin constants: 0.0, 0.0, 0.5.
169 /// <since_tizen> 3 </since_tizen>
170 public static Position ParentOriginTopLeft
174 global::System.IntPtr cPtr = Interop.NDalicParentOrigin.ParentOriginTopLeft_get();
175 Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false);
176 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
182 /// ParentOrigin constants: 0.5, 0.0, 0.5.
184 /// <since_tizen> 3 </since_tizen>
185 public static Position ParentOriginTopCenter
189 global::System.IntPtr cPtr = Interop.NDalicParentOrigin.ParentOriginTopCenter_get();
190 Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false);
191 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
197 /// ParentOrigin constants: 1.0, 0.0, 0.5.
199 /// <since_tizen> 3 </since_tizen>
200 public static Position ParentOriginTopRight
204 global::System.IntPtr cPtr = Interop.NDalicParentOrigin.ParentOriginTopRight_get();
205 Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false);
206 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
212 /// ParentOrigin constants: 0.0, 0.5, 0.5.
214 /// <since_tizen> 3 </since_tizen>
215 public static Position ParentOriginCenterLeft
219 global::System.IntPtr cPtr = Interop.NDalicParentOrigin.ParentOriginCenterLeft_get();
220 Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false);
221 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
227 /// ParentOrigin constants: 0.0, 0.5, 0.5
229 /// <since_tizen> 3 </since_tizen>
230 public static Position ParentOriginCenter
234 global::System.IntPtr cPtr = Interop.NDalicParentOrigin.ParentOriginCenter_get();
235 Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false);
236 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
242 /// ParentOrigin constants: 1.0, 0.5, 0.5.
244 /// <since_tizen> 3 </since_tizen>
245 public static Position ParentOriginCenterRight
249 global::System.IntPtr cPtr = Interop.NDalicParentOrigin.ParentOriginCenterRight_get();
250 Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false);
251 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
257 /// ParentOrigin constants: 0.0f, 1.0f, 0.5f.
259 /// <since_tizen> 3 </since_tizen>
260 public static Position ParentOriginBottomLeft
264 global::System.IntPtr cPtr = Interop.NDalicParentOrigin.ParentOriginBottomLeft_get();
265 Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false);
266 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
272 /// ParentOrigin constants: 0.5, 1.0, 0.5.
274 /// <since_tizen> 3 </since_tizen>
275 public static Position ParentOriginBottomCenter
279 global::System.IntPtr cPtr = Interop.NDalicParentOrigin.ParentOriginBottomCenter_get();
280 Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false);
281 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
287 /// ParentOrigin constants: 1.0, 1.0, 0.5.
289 /// <since_tizen> 3 </since_tizen>
290 public static Position ParentOriginBottomRight
294 global::System.IntPtr cPtr = Interop.NDalicParentOrigin.ParentOriginBottomRight_get();
295 Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false);
296 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
302 /// PivotPoint constants: 0.0.
304 /// <since_tizen> 3 </since_tizen>
305 public static float PivotPointTop
309 float ret = Interop.NDalicAnchorPoint.AnchorPointTop_get();
310 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
316 /// PivotPoint constants: 1.0.
318 /// <since_tizen> 3 </since_tizen>
319 public static float PivotPointBottom
323 float ret = Interop.NDalicAnchorPoint.AnchorPointBottom_get();
324 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
330 /// PivotPoint constants: 0.0.
332 /// <since_tizen> 3 </since_tizen>
333 public static float PivotPointLeft
337 float ret = Interop.NDalicAnchorPoint.AnchorPointLeft_get();
338 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
344 /// PivotPoint constants: 1.0.
346 /// <since_tizen> 3 </since_tizen>
347 public static float PivotPointRight
351 float ret = Interop.NDalicAnchorPoint.AnchorPointRight_get();
352 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
358 /// PivotPoint constants: 0.0.
360 /// <since_tizen> 3 </since_tizen>
361 public static float PivotPointMiddle
365 float ret = Interop.NDalicAnchorPoint.AnchorPointMiddle_get();
366 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
372 /// PivotPoint constants: 0.0, 0.0, 0.5.
374 /// <since_tizen> 3 </since_tizen>
375 public static Position PivotPointTopLeft
379 global::System.IntPtr cPtr = Interop.NDalicAnchorPoint.AnchorPointTopLeft_get();
380 Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false);
381 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
387 /// PivotPoint constants: 0.5, 0.0, 0.5.
389 /// <since_tizen> 3 </since_tizen>
390 public static Position PivotPointTopCenter
394 global::System.IntPtr cPtr = Interop.NDalicAnchorPoint.AnchorPointTopCenter_get();
395 Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false);
396 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
402 /// PivotPoint constants: 1.0, 0.0, 0.5.
404 /// <since_tizen> 3 </since_tizen>
405 public static Position PivotPointTopRight
409 global::System.IntPtr cPtr = Interop.NDalicAnchorPoint.AnchorPointTopRight_get();
410 Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false);
411 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
417 /// PivotPoint constants: 0.0, 0.5, 0.5.
419 /// <since_tizen> 3 </since_tizen>
420 public static Position PivotPointCenterLeft
424 global::System.IntPtr cPtr = Interop.NDalicAnchorPoint.AnchorPointCenterLeft_get();
425 Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false);
426 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
432 /// PivotPoint constants: 0.5, 0.5, 0.5.
434 /// <since_tizen> 3 </since_tizen>
435 public static Position PivotPointCenter
439 global::System.IntPtr cPtr = Interop.NDalicAnchorPoint.AnchorPointCenter_get();
440 Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false);
441 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
447 /// PivotPoint constants: 1.0, 0.5, 0.5.
449 /// <since_tizen> 3 </since_tizen>
450 public static Position PivotPointCenterRight
454 global::System.IntPtr cPtr = Interop.NDalicAnchorPoint.AnchorPointCenterRight_get();
455 Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false);
456 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
462 /// PivotPoint constants: 0.0, 1.0, 0.5.
464 /// <since_tizen> 3 </since_tizen>
465 public static Position PivotPointBottomLeft
469 global::System.IntPtr cPtr = Interop.NDalicAnchorPoint.AnchorPointBottomLeft_get();
470 Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false);
471 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
477 /// PivotPoint constants: 0.5, 1.0, 0.5
479 /// <since_tizen> 3 </since_tizen>
480 public static Position PivotPointBottomCenter
484 global::System.IntPtr cPtr = Interop.NDalicAnchorPoint.AnchorPointBottomCenter_get();
485 Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false);
486 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
492 /// PivotPoint constants: 1.0, 1.0, 0.5.
494 /// <since_tizen> 3 </since_tizen>
495 public static Position PivotPointBottomRight
499 global::System.IntPtr cPtr = Interop.NDalicAnchorPoint.AnchorPointBottomRight_get();
500 Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false);
501 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
507 /// Constant ( 1.0f, 1.0f, 1.0f ).
509 /// <since_tizen> 3 </since_tizen>
510 public static Position One
514 global::System.IntPtr cPtr = Interop.Vector3.Vector3_ONE_get();
515 Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false);
516 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
522 /// Constant ( 0.0f, 0.0f, 0.0f ).
524 /// <since_tizen> 3 </since_tizen>
525 public static Position Zero
529 global::System.IntPtr cPtr = Interop.Vector3.Vector3_ZERO_get();
530 Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false);
531 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
539 /// <since_tizen> 3 </since_tizen>
544 Interop.Vector3.Vector3_X_set(swigCPtr, value);
545 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
549 float ret = Interop.Vector3.Vector3_X_get(swigCPtr);
550 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
558 /// <since_tizen> 3 </since_tizen>
563 Interop.Vector3.Vector3_Y_set(swigCPtr, value);
564 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
568 float ret = Interop.Vector3.Vector3_Y_get(swigCPtr);
569 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
577 /// <since_tizen> 3 </since_tizen>
582 Interop.Vector3.Vector3_Z_set(swigCPtr, value);
583 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
587 float ret = Interop.Vector3.Vector3_Z_get(swigCPtr);
588 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
593 internal static Position XAxis
597 global::System.IntPtr cPtr = Interop.Vector3.Vector3_XAXIS_get();
598 Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false);
599 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
604 internal static Position YAxis
608 global::System.IntPtr cPtr = Interop.Vector3.Vector3_YAXIS_get();
609 Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false);
610 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
615 internal static Position ZAxis
619 global::System.IntPtr cPtr = Interop.Vector3.Vector3_ZAXIS_get();
620 Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false);
621 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
626 internal static Position NegativeXAxis
630 global::System.IntPtr cPtr = Interop.Vector3.Vector3_NEGATIVE_XAXIS_get();
631 Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false);
632 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
637 internal static Position NegativeYAxis
641 global::System.IntPtr cPtr = Interop.Vector3.Vector3_NEGATIVE_YAXIS_get();
642 Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false);
643 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
648 internal static Position NegativeZAxis
652 global::System.IntPtr cPtr = Interop.Vector3.Vector3_NEGATIVE_ZAXIS_get();
653 Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false);
654 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
660 /// The const array subscript operator overload. Should be 0, 1, or 2.
662 /// <param name="index">The subscript index.</param>
663 /// <returns>The float at the given index.</returns>
664 /// <since_tizen> 3 </since_tizen>
665 public float this[uint index]
669 return ValueOfIndex(index);
675 /// An addition operator.
677 /// <param name="arg1">The vector to add.</param>
678 /// <param name="arg2">The vector to add.</param>
679 /// <returns>The vector containing the result of the addition.</returns>
680 /// <since_tizen> 3 </since_tizen>
681 public static Position operator +(Position arg1, Position arg2)
683 return arg1.Add(arg2);
687 /// The subtraction operator.
689 /// <param name="arg1">The vector to subtract.</param>
690 /// <param name="arg2">The vector to subtract.</param>
691 /// <returns>The vector containing the result of the subtraction.</returns>
692 /// <since_tizen> 3 </since_tizen>
693 public static Position operator -(Position arg1, Position arg2)
695 return arg1.Subtract(arg2);
699 /// The unary negation operator.
701 /// <param name="arg1">The vector to negate.</param>
702 /// <returns>The vector containg the negation.</returns>
703 /// <since_tizen> 3 </since_tizen>
704 public static Position operator -(Position arg1)
706 return arg1.Subtract();
710 /// The multiplication operator.
712 /// <param name="arg1">The vector to multiply.</param>
713 /// <param name="arg2">The vector to multiply.</param>
714 /// <returns>The vector containing the result of the multiplication.</returns>
715 /// <since_tizen> 3 </since_tizen>
716 public static Position operator *(Position arg1, Position arg2)
718 return arg1.Multiply(arg2);
722 /// The multiplication operator.
724 /// <param name="arg1">The vector to multiply</param>
725 /// <param name="arg2">The float value to scale the vector.</param>
726 /// <returns>The vector containing the result of scaling.</returns>
727 /// <since_tizen> 3 </since_tizen>
728 public static Position operator *(Position arg1, float arg2)
730 return arg1.Multiply(arg2);
734 /// The division operator.
736 /// <param name="arg1">The vector to divide.</param>
737 /// <param name="arg2">The vector to divide.</param>
738 /// <returns>The vector containing the result of the division.</returns>
739 /// <since_tizen> 3 </since_tizen>
740 public static Position operator /(Position arg1, Position arg2)
742 return arg1.Divide(arg2);
746 /// The division operator.
748 /// <param name="arg1">The vector to divide.</param>
749 /// <param name="arg2">The float value to scale the vector by.</param>
750 /// <returns>The vector containing the result of scaling.</returns>
751 /// <since_tizen> 3 </since_tizen>
752 public static Position operator /(Position arg1, float arg2)
754 return arg1.Divide(arg2);
758 /// Converts a position instance to a Vector3 instance.
760 /// <since_tizen> 3 </since_tizen>
761 public static implicit operator Vector3(Position Position)
763 return new Vector3(Position.X, Position.Y, Position.Z);
767 /// Converts a Vector3 instance to a position instance.
769 /// <since_tizen> 3 </since_tizen>
770 public static implicit operator Position(Vector3 vec)
772 return new Position(vec.X, vec.Y, vec.Z);
776 /// Determines whether the specified object is equal to the current object.
778 /// <param name="obj">The object to compare with the current object.</param>
779 /// <returns>true if the specified object is equal to the current object; otherwise, false.</returns>
780 public override bool Equals(System.Object obj)
782 Position position = obj as Position;
784 if (X == position?.X && Y == position?.Y && Z == position?.Z)
792 /// Gets the the hash code of this Position.
794 /// <returns>The Hash Code.</returns>
795 /// <since_tizen> 6 </since_tizen>
796 public override int GetHashCode()
798 return swigCPtr.Handle.GetHashCode();
804 /// <since_tizen> 3 </since_tizen>
805 public void Dispose()
807 //Throw excpetion if Dispose() is called in separate thread.
808 if (!Window.IsInstalled())
810 throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread.");
815 Dispose(DisposeTypes.Implicit);
819 Dispose(DisposeTypes.Explicit);
820 System.GC.SuppressFinalize(this);
825 /// Compares if rhs is equal to.
827 /// <param name="rhs">The vector to compare.</param>
828 /// <returns>Returns true if the two vectors are equal, otherwise false.</returns>
829 /// <since_tizen> 3 </since_tizen>
830 public bool EqualTo(Position rhs)
832 bool ret = Interop.Vector3.Vector3_EqualTo(swigCPtr, Position.getCPtr(rhs));
833 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
838 /// Compares if rhs is not equal to.
840 /// <param name="rhs">The vector to compare.</param>
841 /// <returns>Returns true if the two vectors are not equal, otherwise false.</returns>
842 /// <since_tizen> 3 </since_tizen>
843 public bool NotEqualTo(Position rhs)
845 bool ret = Interop.Vector3.Vector3_NotEqualTo(swigCPtr, Position.getCPtr(rhs));
846 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
850 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Position obj)
852 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
855 internal static Position GetPositionFromPtr(global::System.IntPtr cPtr)
857 Position ret = new Position(cPtr, false);
858 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
865 /// <since_tizen> 3 </since_tizen>
866 protected virtual void Dispose(DisposeTypes type)
873 if (type == DisposeTypes.Explicit)
876 //Release your own managed resources here.
877 //You should release all of your own disposable objects here.
880 //Release your own unmanaged resources here.
881 //You should not access any managed member here except static instance.
882 //because the execution order of Finalizes is non-deterministic.
884 if (swigCPtr.Handle != global::System.IntPtr.Zero)
889 Interop.Vector3.delete_Vector3(swigCPtr);
891 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
897 private Position Add(Position rhs)
899 Position ret = new Position(Interop.Vector3.Vector3_Add(swigCPtr, Position.getCPtr(rhs)), true);
900 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
904 private Position Subtract(Position rhs)
906 Position ret = new Position(Interop.Vector3.Vector3_Subtract__SWIG_0(swigCPtr, Position.getCPtr(rhs)), true);
907 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
911 private Position Multiply(Position rhs)
913 Position ret = new Position(Interop.Vector3.Vector3_Multiply__SWIG_0(swigCPtr, Position.getCPtr(rhs)), true);
914 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
918 private Position Multiply(float rhs)
920 Position ret = new Position(Interop.Vector3.Vector3_Multiply__SWIG_1(swigCPtr, rhs), true);
921 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
925 private Position Divide(Position rhs)
927 Position ret = new Position(Interop.Vector3.Vector3_Divide__SWIG_0(swigCPtr, Position.getCPtr(rhs)), true);
928 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
932 private Position Divide(float rhs)
934 Position ret = new Position(Interop.Vector3.Vector3_Divide__SWIG_1(swigCPtr, rhs), true);
935 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
939 private Position Subtract()
941 Position ret = new Position(Interop.Vector3.Vector3_Subtract__SWIG_1(swigCPtr), true);
942 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
946 private float ValueOfIndex(uint index)
948 float ret = Interop.Vector3.Vector3_ValueOfIndex__SWIG_0(swigCPtr, index);
949 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();