diff --git a/src/Tizen.NUI/src/public/Common/Matrix.cs b/src/Tizen.NUI/src/public/Common/Matrix.cs
index d6816da85ba..3dad6749718 100755
--- a/src/Tizen.NUI/src/public/Common/Matrix.cs
+++ b/src/Tizen.NUI/src/public/Common/Matrix.cs
@@ -19,7 +19,21 @@
using System.ComponentModel;
namespace Tizen.NUI
-{ /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
+{
+ ///
+ /// The Matrix class represents transformations and projections.
+ /// The matrix is stored as a flat array and is Column Major, i.e. the storage order is as follows (numbers represent indices of array):
+ ///
+ /// 0 4 8 12
+ /// 1 5 9 13
+ /// 2 6 10 14
+ /// 3 7 11 15
+ ///
+ /// Each axis is contiguous in memory, so the x-axis corresponds to elements 0, 1, 2 and 3, the y-axis corresponds to
+ /// elements 4, 5, 6, 7, the z-axis corresponds to elements 12, 13, 14 and 15, and the translation vector corresponds to
+ /// elements 12, 13 and 14.
+ ///
+ /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
[EditorBrowsable(EditorBrowsableState.Never)]
public class Matrix : Disposable
{
@@ -27,44 +41,94 @@ internal Matrix(global::System.IntPtr cPtr, bool cMemoryOwn) : base(cPtr, cMemor
{
}
+ /// This will not be public opened.
+ [EditorBrowsable(EditorBrowsableState.Never)]
protected override void ReleaseSwigCPtr(System.Runtime.InteropServices.HandleRef swigCPtr)
{
Interop.Matrix.DeleteMatrix(swigCPtr);
}
+ ///
+ /// The constructor initialized as zero.
+ ///
+ /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
+ [EditorBrowsable(EditorBrowsableState.Never)]
public Matrix() : this(Interop.Matrix.NewMatrix(), true)
{
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
}
+ ///
+ /// The constructor whether initialize matrix or not.
+ ///
+ /// True if we want to initialize values as zero. False if we just allocate and do not initalize value.
+ /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
+ [EditorBrowsable(EditorBrowsableState.Never)]
public Matrix(bool initialize) : this(Interop.Matrix.NewMatrix(initialize), true)
{
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
}
+ ///
+ /// The constructor with continuous float array.
+ ///
+ /// Array of float value.
+ ///
+ /// Please note that NUI using column major matrix.
+ ///
+ /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
+ [EditorBrowsable(EditorBrowsableState.Never)]
public Matrix(float[] array) : this(Interop.Matrix.NewMatrix(array), true)
{
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
}
+ ///
+ /// The constructor with Rotation to be rotation transform matrix.
+ ///
+ /// Rotation information.
+ /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
+ [EditorBrowsable(EditorBrowsableState.Never)]
public Matrix(Rotation rotation) : this(Interop.Matrix.NewMatrixQuaternion(Rotation.getCPtr(rotation)), true)
{
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
}
+ ///
+ /// The constructor.
+ ///
+ /// Matrix to create this matrix from
+ /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
+ [EditorBrowsable(EditorBrowsableState.Never)]
public Matrix(Matrix matrix) : this(Interop.Matrix.NewMatrix(Matrix.getCPtr(matrix)), true)
{
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
}
- public Matrix Assign(Matrix matrix)
+ ///
+ /// Assign.
+ ///
+ /// A reference to the copied handle.
+ /// A reference to this.
+ internal Matrix Assign(Matrix rhs)
{
- Matrix ret = new Matrix(Interop.Matrix.Assign(SwigCPtr, Matrix.getCPtr(matrix)), false);
+ Matrix ret = new Matrix(Interop.Matrix.Assign(SwigCPtr, Matrix.getCPtr(rhs)), false);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
- public static Matrix IDENTITY
+ ///
+ /// The matrix as identity
+ ///
+ ///
+ /// [[1, 0, 0, 0],
+ /// [0, 1, 0, 0],
+ /// [0, 0, 1, 0],
+ /// [0, 0, 0, 1]]
+ ///
+ /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static Matrix Identity
{
get
{
@@ -137,21 +201,21 @@ public void Transpose()
public Vector3 GetXAxis()
{
- Vector3 ret = new Vector3(Interop.Matrix.GetXAxis(SwigCPtr), true);
+ Vector3 ret = new Vector3(Interop.Matrix.GetXAxis(SwigCPtr), false);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
public Vector3 GetYAxis()
{
- Vector3 ret = new Vector3(Interop.Matrix.GetYAxis(SwigCPtr), true);
+ Vector3 ret = new Vector3(Interop.Matrix.GetYAxis(SwigCPtr), false);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
public Vector3 GetZAxis()
{
- Vector3 ret = new Vector3(Interop.Matrix.GetZAxis(SwigCPtr), true);
+ Vector3 ret = new Vector3(Interop.Matrix.GetZAxis(SwigCPtr), false);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
diff --git a/src/Tizen.NUI/src/public/Common/Matrix3.cs b/src/Tizen.NUI/src/public/Common/Matrix3.cs
index 2de4ee44d74..5b875d72dc2 100755
--- a/src/Tizen.NUI/src/public/Common/Matrix3.cs
+++ b/src/Tizen.NUI/src/public/Common/Matrix3.cs
@@ -28,6 +28,8 @@ internal Matrix3(global::System.IntPtr cPtr, bool cMemoryOwn) : base(cPtr, cMemo
{
}
+ /// This will not be public opened.
+ [EditorBrowsable(EditorBrowsableState.Never)]
protected override void ReleaseSwigCPtr(System.Runtime.InteropServices.HandleRef swigCPtr)
{
Interop.Matrix.DeleteMatrix3(swigCPtr);