Class Matrix3

    Definition

    Namespace:
    Tizen.NUI
    Assembly:
    Tizen.NUI.dll

    A 3x3 matrix.
    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   3   6
    1   4   7
    2   5   8

    Each axis is contiguous in memory, so the x-axis corresponds to elements 0, 1, and 2, the y-axis corresponds to elements 3, 4, 5, the z-axis corresponds to elements 6, 7, and 8.

    public class Matrix3 : Disposable
    Inheritance
    object
    Disposable
    Matrix3

    Constructors

    View Source

    Matrix3()

    The constructor initialized as zero.

    Declaration
    public Matrix3()
    View Source

    Matrix3(float, float, float, float, float, float, float, float, float)

    The constructor with nine floats.

    Declaration
    public Matrix3(float s00, float s01, float s02, float s10, float s11, float s12, float s20, float s21, float s22)
    Parameters
    Type Name Description
    float s00

    Value of 0 column, 0 row.

    float s01

    Value of 0 column, 1 row.

    float s02

    Value of 0 column, 2 row.

    float s10

    Value of 1 column, 0 row.

    float s11

    Value of 1 column, 1 row.

    float s12

    Value of 1 column, 2 row.

    float s20

    Value of 2 column, 0 row.

    float s21

    Value of 2 column, 1 row.

    float s22

    Value of 2 column, 2 row.

    View Source

    Matrix3(Matrix)

    The constructor.

    Declaration
    public Matrix3(Matrix matrix)
    Parameters
    Type Name Description
    Matrix matrix

    The matrix to copy value. The translation and shear components are ignored.

    View Source

    Matrix3(Matrix3)

    The constructor.

    Declaration
    public Matrix3(Matrix3 matrix)
    Parameters
    Type Name Description
    Matrix3 matrix

    The matrix to copy value.

    Properties

    View Source

    Identity

    The matrix as identity

    Declaration
    public static Matrix3 Identity { get; }
    Property Value
    Type Description
    Matrix3
    View Source

    this[uint]

    Get/set the value of matrix by it's index.

    Declaration
    public float this[uint index] { get; set; }
    Parameters
    Type Name Description
    uint index

    The index to get/set value.

    Property Value
    Type Description
    float

    Methods

    View Source

    EqualTo(Matrix3)

    Compares if rhs is equal to.

    Declaration
    public bool EqualTo(Matrix3 rhs)
    Parameters
    Type Name Description
    Matrix3 rhs

    The matrix to compare.

    Returns
    Type Description
    bool

    Returns true if the two matrixes are equal, otherwise false.

    View Source

    GetHashCode()

    Gets the hash code of this Matrix3.

    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    int

    The Hash Code.

    View Source

    Invert()

    Generic brute force matrix invert.

    Declaration
    public bool Invert()
    Returns
    Type Description
    bool

    True if successful.

    View Source

    Magnitude()

    Magnitude returns the average of the absolute values of the elements * 3.0f. The Magnitude of the unit matrix is therefore 1.

    Declaration
    public float Magnitude()
    Returns
    Type Description
    float

    The magnitude - always positive.

    View Source

    Multiply(Matrix3, Matrix3, Matrix3)

    Function to multiply two matrices and store the result onto third.
    Use this method in time critical path as it does not require temporaries.

    Declaration
    public static void Multiply(Matrix3 result, Matrix3 lhs, Matrix3 rhs)
    Parameters
    Type Name Description
    Matrix3 result

    Result of the multiplication.

    Matrix3 lhs

    The left-hand-side Matrix3. this can be same matrix as result.

    Matrix3 rhs

    The right-hand-side Matrix3. this cannot be same matrix as result.

    View Source

    Multiply(Matrix3)

    Multiply the Matrix3 and Matrix3.

    Declaration
    public Matrix3 Multiply(Matrix3 rhs)
    Parameters
    Type Name Description
    Matrix3 rhs

    The right-hand-side Matrix3.

    Returns
    Type Description
    Matrix3

    The matrix multiply as this * rhs.

    View Source

    Multiply(Vector3)

    Multiply the Matrix3 and Vector3.

    Declaration
    public Vector3 Multiply(Vector3 rhs)
    Parameters
    Type Name Description
    Vector3 rhs

    The right-hand-side Vector3.

    Returns
    Type Description
    Vector3

    The vector multiply as this * rhs.

    View Source

    MultiplyAssign(Matrix3)

    Multiply the Matrix3 and Matrix3. Result will be stored into this Matrix3.

    Declaration
    public void MultiplyAssign(Matrix3 rhs)
    Parameters
    Type Name Description
    Matrix3 rhs

    The right-hand-side Matrix3.

    View Source

    NotEqualTo(Matrix3)

    Compares if rhs is not equal to.

    Declaration
    public bool NotEqualTo(Matrix3 rhs)
    Parameters
    Type Name Description
    Matrix3 rhs

    The matrix to compare.

    Returns
    Type Description
    bool

    Returns true if the two matrixes are not equal, otherwise false.

    View Source

    ReleaseSwigCPtr(HandleRef)

    Declaration
    protected override void ReleaseSwigCPtr(System.Runtime.InteropServices.HandleRef swigCPtr)
    Parameters
    Type Name Description
    System.Runtime.InteropServices.HandleRef swigCPtr
    Overrides
    Disposable.ReleaseSwigCPtr(System.Runtime.InteropServices.HandleRef)
    View Source

    Scale(float)

    Multiplies all elements of the matrix by the scale value.

    Declaration
    public void Scale(float scale)
    Parameters
    Type Name Description
    float scale

    The value by which to scale the whole matrix.

    View Source

    ScaledInverseTranspose()

    If the matrix is invertible, then this method inverts, transposes and scales the matrix such that the resultant element values average 1.
    If the matrix is not invertible, then the matrix is left unchanged.

    Declaration
    public bool ScaledInverseTranspose()
    Returns
    Type Description
    bool

    True if the matrix is invertable. False otherwise

    View Source

    SetIdentity()

    Make matrix as identity.

    Declaration
    public void SetIdentity()
    View Source

    SetValueAtIndex(uint, float)

    Set the value at matrix by it's index.

    Declaration
    public void SetValueAtIndex(uint index, float value)
    Parameters
    Type Name Description
    uint index

    The index to set value.

    float value

    The value to set.

    View Source

    SetValueAtIndex(uint, uint, float)

    Set the value at matrix by it's row index and column index.

    Declaration
    public void SetValueAtIndex(uint indexRow, uint indexColumn, float value)
    Parameters
    Type Name Description
    uint indexRow

    The row index to set value.

    uint indexColumn

    The column index to set value.

    float value

    The value to set.

    View Source

    Transpose()

    Swaps the rows to columns.

    Declaration
    public bool Transpose()
    Returns
    Type Description
    bool
    View Source

    ValueOfIndex(uint, uint)

    Get the value of matrix by it's row index and column index.

    Declaration
    public float ValueOfIndex(uint indexRow, uint indexColumn)
    Parameters
    Type Name Description
    uint indexRow

    The row index to get value.

    uint indexColumn

    The column index to get value.

    Returns
    Type Description
    float

    A value of index

    View Source

    ValueOfIndex(uint)

    Get the value of matrix by it's index.

    Declaration
    public float ValueOfIndex(uint index)
    Parameters
    Type Name Description
    uint index

    The index to get value.

    Returns
    Type Description
    float

    A value of index

    Operators

    View Source

    operator *(Matrix3, Matrix3)

    Multiply Matrix3 and Matrix3.

    Declaration
    public static Matrix3 operator *(Matrix3 lhs, Matrix3 rhs)
    Parameters
    Type Name Description
    Matrix3 lhs

    The left-hand-side Matrix3.

    Matrix3 rhs

    The right-hand-side Matrix3.

    Returns
    Type Description
    Matrix3

    The Matrix3 multiply as lhs * rhs.

    View Source

    operator *(Matrix3, Vector3)

    Multiply Matrix3 and Vector3.

    Declaration
    public static Vector3 operator *(Matrix3 lhs, Vector3 rhs)
    Parameters
    Type Name Description
    Matrix3 lhs

    The left-hand-side Matrix3.

    Vector3 rhs

    The right-hand-side Vector3.

    Returns
    Type Description
    Vector3

    The vector multiply as lhs * rhs.

    Extension Methods

    EXamlExtensions.LoadFromEXamlByRelativePath<T>(T, string)
    Extensions.LoadFromXaml<TXaml>(TXaml, string)
    Extensions.LoadFromXaml<TXaml>(TXaml, Type)
    Extensions.LoadFromXamlFile<TXaml>(TXaml, string)
    • View Source
    Back to top Copyright © 2016-2025 Samsung
    Generated by DocFX