-/** Copyright (c) 2017 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.
-*
-*/
+/*
+ * Copyright(c) 2017 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.
+ *
+ */
namespace Tizen.NUI
{
/// <summary>
- /// A two dimensional vector.
+ /// A two-dimensional vector.
/// </summary>
public class Vector2 : global::System.IDisposable
{
private global::System.Runtime.InteropServices.HandleRef swigCPtr;
+ /// <summary>
+ /// swigCMemOwn.
+ /// </summary>
protected bool swigCMemOwn;
internal Vector2(global::System.IntPtr cPtr, bool cMemoryOwn)
//A Flag to check who called Dispose(). (By User or DisposeQueue)
private bool isDisposeQueued = false;
- //A Flat to check if it is already disposed.
+
+ /// <summary>
+ /// A Flat to check if it is already disposed.
+ /// </summary>
protected bool disposed = false;
+ /// <summary>
+ /// Destructor.
+ /// </summary>
+ /// <since_tizen> 3 </since_tizen>
~Vector2()
{
if(!isDisposeQueued)
}
}
+ /// <summary>
+ /// Dispose.
+ /// </summary>
+ /// <since_tizen> 3 </since_tizen>
public void Dispose()
{
//Throw excpetion if Dispose() is called in separate thread.
}
}
+ /// <summary>
+ /// Dispose.
+ /// </summary>
+ /// <param name="type">The dispose type</param>
+ /// <since_tizen> 3 </since_tizen>
protected virtual void Dispose(DisposeTypes type)
{
if (disposed)
}
/// <summary>
- /// Addition operator.
+ /// The addition operator.
/// </summary>
- /// <param name="arg1">First value</param>
- /// <param name="arg2">Second value</param>
- /// <returns>A vector containing the result of the addition</returns>
+ /// <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 Vector2 operator +(Vector2 arg1, Vector2 arg2)
{
return arg1.Add(arg2);
}
/// <summary>
- /// Subtraction operator.
+ /// The subtraction operator.
/// </summary>
- /// <param name="arg1">First value</param>
- /// <param name="arg2">Second value</param>
- /// <returns>A vector containing the result of the subtraction</returns>
+ /// <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 Vector2 operator -(Vector2 arg1, Vector2 arg2)
{
return arg1.Subtract(arg2);
}
/// <summary>
- /// Unary negation operator.
+ /// The unary negation operator.
/// </summary>
- /// <param name="arg1">Target Value</param>
- /// <returns>A vector containg the negation</returns>
+ /// <param name="arg1">The target value.</param>
+ /// <returns>The vector containing the negation.</returns>
+ /// <since_tizen> 3 </since_tizen>
public static Vector2 operator -(Vector2 arg1)
{
return arg1.Subtract();
}
/// <summary>
- /// Multiplication operator.
+ /// The multiplication operator.
/// </summary>
- /// <param name="arg1">First Value</param>
- /// <param name="arg2">Second Value</param>
- /// <returns>A vector containing the result of the multiplication</returns>
+ /// <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 Vector2 operator *(Vector2 arg1, Vector2 arg2)
{
return arg1.Multiply(arg2);
}
/// <summary>
- /// Multiplication operator.
+ /// Th multiplication operator.
/// </summary>
- /// <param name="arg1">First Value</param>
- /// <param name="arg2">The float value to scale the vector</param>
- /// <returns>A vector containing the result of the scaling</returns>
+ /// <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 Vector2 operator *(Vector2 arg1, float arg2)
{
return arg1.Multiply(arg2);
}
/// <summary>
- /// Division operator.
+ /// The division operator.
/// </summary>
- /// <param name="arg1">First Value</param>
- /// <param name="arg2">Second Value</param>
- /// <returns>A vector containing the result of the division</returns>
+ /// <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 Vector2 operator /(Vector2 arg1, Vector2 arg2)
{
return arg1.Divide(arg2);
}
/// <summary>
- /// Division operator.
+ /// Th division operator.
/// </summary>
- /// <param name="arg1">First Value</param>
- /// <param name="arg2">The float value to scale the vector by</param>
- /// <returns>A vector containing the result of the scaling</returns>
+ /// <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 Vector2 operator /(Vector2 arg1, float arg2)
{
return arg1.Divide(arg2);
}
/// <summary>
- /// Array subscript operator overload.
+ /// The array subscript operator overload.
/// </summary>
- /// <param name="index">Subscript index</param>
- /// <returns>The float at the given index</returns>
+ /// <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
}
/// <summary>
- /// Default constructor, initializes the vector to 0.
+ /// The default constructor initializes the vector to 0.
/// </summary>
+ /// <since_tizen> 3 </since_tizen>
public Vector2() : this(NDalicPINVOKE.new_Vector2__SWIG_0(), true)
{
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
}
/// <summary>
- /// Constructor.
+ /// The constructor.
/// </summary>
- /// <param name="x">x or width component</param>
- /// <param name="y">y or height component</param>
+ /// <param name="x">The x or width component.</param>
+ /// <param name="y">The y or height component.</param>
+ /// <since_tizen> 3 </since_tizen>
public Vector2(float x, float y) : this(NDalicPINVOKE.new_Vector2__SWIG_1(x, y), true)
{
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
}
/// <summary>
- /// Conversion constructor from an array of two floats.
+ /// The conversion constructor from an array of two floats.
/// </summary>
- /// <param name="array">Array of xy</param>
+ /// <param name="array">The array of xy.</param>
+ /// <since_tizen> 3 </since_tizen>
public Vector2(float[] array) : this(NDalicPINVOKE.new_Vector2__SWIG_2(array), true)
{
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
}
/// <summary>
- /// Constructor.
+ /// The constructor.
/// </summary>
- /// <param name="vec3">Vector3 to create this vector from</param>
+ /// <param name="vec3">Vector3 to create this vector from.</param>
+ /// <since_tizen> 3 </since_tizen>
public Vector2(Vector3 vec3) : this(NDalicPINVOKE.new_Vector2__SWIG_3(Vector3.getCPtr(vec3)), true)
{
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
}
/// <summary>
- /// Constructor.
+ /// The constructor.
/// </summary>
- /// <param name="vec4">Vector4 to create this vector from</param>
+ /// <param name="vec4">Vector4 to create this vector from.</param>
+ /// <since_tizen> 3 </since_tizen>
public Vector2(Vector4 vec4) : this(NDalicPINVOKE.new_Vector2__SWIG_4(Vector4.getCPtr(vec4)), true)
{
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
}
/// <summary>
- /// (1.0f,1.0f)
+ /// (1.0f,1.0f).
/// </summary>
+ /// <since_tizen> 3 </since_tizen>
public static Vector2 One
{
get
}
/// <summary>
- /// Vector representing the X axis
+ /// The vector representing the x-axis.
/// </summary>
+ /// <since_tizen> 3 </since_tizen>
public static Vector2 XAxis
{
get
}
/// <summary>
- /// Vector representing the Y axis
+ /// The vector representing the y-axis.
/// </summary>
+ /// <since_tizen> 3 </since_tizen>
public static Vector2 YAxis
{
get
}
/// <summary>
- /// Vector representing the negative X axis
+ /// The vector representing the negative x-axis.
/// </summary>
+ /// <since_tizen> 3 </since_tizen>
public static Vector2 NegativeXAxis
{
get
}
/// <summary>
- /// Vector representing the negative Y axis
+ /// The vector representing the negative y-axis.
/// </summary>
+ /// <since_tizen> 3 </since_tizen>
public static Vector2 NegativeYAxis
{
get
}
/// <summary>
- /// (0.0f, 0.0f)
+ /// (0.0f, 0.0f).
/// </summary>
+ /// <since_tizen> 3 </since_tizen>
public static Vector2 Zero
{
get
/// <summary>
/// Returns the length of the vector.
/// </summary>
- /// <returns>The length of the vector</returns>
+ /// <returns>The length of the vector.</returns>
+ /// <since_tizen> 3 </since_tizen>
public float Length()
{
float ret = NDalicPINVOKE.Vector2_Length(swigCPtr);
}
/// <summary>
- /// Returns the length of the vector squared.<br>
+ /// Returns the length of the vector squared.<br />
/// This is more efficient than Length() for threshold
- /// testing as it avoids the use of a square root.<br>
+ /// testing as it avoids the use of a square root.<br />
/// </summary>
/// <returns>The length of the vector squared</returns>
+ /// <since_tizen> 3 </since_tizen>
public float LengthSquared()
{
float ret = NDalicPINVOKE.Vector2_LengthSquared(swigCPtr);
}
/// <summary>
- /// Sets the vector to be unit length, whilst maintaining its direction.
+ /// Sets the vector to be the unit length, whilst maintaining its direction.
/// </summary>
+ /// <since_tizen> 3 </since_tizen>
public void Normalize()
{
NDalicPINVOKE.Vector2_Normalize(swigCPtr);
/// <summary>
/// Clamps the vector between minimum and maximum vectors.
/// </summary>
- /// <param name="min">The minimum vector</param>
- /// <param name="max">The maximum vector</param>
+ /// <param name="min">The minimum vector.</param>
+ /// <param name="max">The maximum vector.</param>
+ /// <since_tizen> 3 </since_tizen>
public void Clamp(Vector2 min, Vector2 max)
{
NDalicPINVOKE.Vector2_Clamp(swigCPtr, Vector2.getCPtr(min), Vector2.getCPtr(max));
}
/// <summary>
- /// x component
+ /// The x component.
/// </summary>
+ /// <since_tizen> 3 </since_tizen>
public float X
{
set
}
/// <summary>
- /// width
+ /// The width.
/// </summary>
+ /// <since_tizen> 3 </since_tizen>
public float Width
{
set
}
/// <summary>
- /// y component
+ /// The y component.
/// </summary>
+ /// <since_tizen> 3 </since_tizen>
public float Y
{
set
}
/// <summary>
- /// height
+ /// The height.
/// </summary>
+ /// <since_tizen> 3 </since_tizen>
public float Height
{
set
}
-}
+}
\ No newline at end of file