Class Matrix3 | Package Manager UI website
docs.unity3d.com
    Show / Hide Table of Contents

    Class Matrix3

    Inheritance
    System.Object
    Matrix3
    Namespace: Unity.UIWidgets.ui
    Syntax
    public class Matrix3 : IEquatable<Matrix3>

    Constructors

    Matrix3(Matrix3)

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

    Fields

    kMPersp0

    Declaration
    public const int kMPersp0 = 6
    Field Value
    Type Description
    System.Int32

    kMPersp1

    Declaration
    public const int kMPersp1 = 7
    Field Value
    Type Description
    System.Int32

    kMPersp2

    Declaration
    public const int kMPersp2 = 8
    Field Value
    Type Description
    System.Int32

    kMScaleX

    Declaration
    public const int kMScaleX = 0
    Field Value
    Type Description
    System.Int32

    kMScaleY

    Declaration
    public const int kMScaleY = 4
    Field Value
    Type Description
    System.Int32

    kMSkewX

    Declaration
    public const int kMSkewX = 1
    Field Value
    Type Description
    System.Int32

    kMSkewY

    Declaration
    public const int kMSkewY = 3
    Field Value
    Type Description
    System.Int32

    kMTransX

    Declaration
    public const int kMTransX = 2
    Field Value
    Type Description
    System.Int32

    kMTransY

    Declaration
    public const int kMTransY = 5
    Field Value
    Type Description
    System.Int32

    Properties

    Item[Int32]

    Declaration
    public float this[int index] { get; set; }
    Parameters
    Type Name Description
    System.Int32 index
    Property Value
    Type Description
    System.Single

    Methods

    concat(Matrix3, Matrix3)

    Declaration
    public static Matrix3 concat(Matrix3 a, Matrix3 b)
    Parameters
    Type Name Description
    Matrix3 a
    Matrix3 b
    Returns
    Type Description
    Matrix3

    copyFrom(Matrix3)

    Declaration
    public void copyFrom(Matrix3 other)
    Parameters
    Type Name Description
    Matrix3 other

    dirtyMatrixTypeCache()

    Declaration
    public void dirtyMatrixTypeCache()

    Equals(Object)

    Declaration
    public override bool Equals(object obj)
    Parameters
    Type Name Description
    System.Object obj
    Returns
    Type Description
    System.Boolean
    Overrides
    System.Object.Equals(System.Object)

    Equals(Matrix3)

    Declaration
    public bool Equals(Matrix3 other)
    Parameters
    Type Name Description
    Matrix3 other
    Returns
    Type Description
    System.Boolean

    get9(Single[])

    Declaration
    public void get9(float[] buffer)
    Parameters
    Type Name Description
    System.Single[] buffer

    GetHashCode()

    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    System.Int32
    Overrides
    System.Object.GetHashCode()

    getPerspX()

    Declaration
    public float getPerspX()
    Returns
    Type Description
    System.Single

    getPerspY()

    Declaration
    public float getPerspY()
    Returns
    Type Description
    System.Single

    getScaleX()

    Declaration
    public float getScaleX()
    Returns
    Type Description
    System.Single

    getScaleY()

    Declaration
    public float getScaleY()
    Returns
    Type Description
    System.Single

    getSkewX()

    Declaration
    public float getSkewX()
    Returns
    Type Description
    System.Single

    getSkewY()

    Declaration
    public float getSkewY()
    Returns
    Type Description
    System.Single

    getTranslateX()

    Declaration
    public float getTranslateX()
    Returns
    Type Description
    System.Single

    getTranslateY()

    Declaration
    public float getTranslateY()
    Returns
    Type Description
    System.Single

    getType()

    Declaration
    public Matrix3.TypeMask getType()
    Returns
    Type Description
    Matrix3.TypeMask

    hasPerspective()

    Declaration
    public bool hasPerspective()
    Returns
    Type Description
    System.Boolean

    I()

    Declaration
    public static Matrix3 I()
    Returns
    Type Description
    Matrix3

    invert(Matrix3)

    Declaration
    public bool invert(Matrix3 inverse)
    Parameters
    Type Name Description
    Matrix3 inverse
    Returns
    Type Description
    System.Boolean

    isFinite()

    Declaration
    public bool isFinite()
    Returns
    Type Description
    System.Boolean

    isIdentity()

    Declaration
    public bool isIdentity()
    Returns
    Type Description
    System.Boolean

    isScaleTranslate()

    Declaration
    public bool isScaleTranslate()
    Returns
    Type Description
    System.Boolean

    isSimilarity(Single)

    Declaration
    public bool isSimilarity(float tol = 0.000244140625F)
    Parameters
    Type Name Description
    System.Single tol
    Returns
    Type Description
    System.Boolean

    isTranslate()

    Declaration
    public bool isTranslate()
    Returns
    Type Description
    System.Boolean

    makeAll(Single, Single, Single, Single, Single, Single, Single, Single, Single)

    Declaration
    public static Matrix3 makeAll(float scaleX, float skewX, float transX, float skewY, float scaleY, float transY, float pers0, float pers1, float pers2)
    Parameters
    Type Name Description
    System.Single scaleX
    System.Single skewX
    System.Single transX
    System.Single skewY
    System.Single scaleY
    System.Single transY
    System.Single pers0
    System.Single pers1
    System.Single pers2
    Returns
    Type Description
    Matrix3

    makeRotate(Single)

    Declaration
    public static Matrix3 makeRotate(float radians)
    Parameters
    Type Name Description
    System.Single radians
    Returns
    Type Description
    Matrix3

    makeRotate(Single, Single, Single)

    Declaration
    public static Matrix3 makeRotate(float radians, float px, float py)
    Parameters
    Type Name Description
    System.Single radians
    System.Single px
    System.Single py
    Returns
    Type Description
    Matrix3

    makeScale(Single)

    Declaration
    public static Matrix3 makeScale(float scale)
    Parameters
    Type Name Description
    System.Single scale
    Returns
    Type Description
    Matrix3

    makeScale(Single, Single)

    Declaration
    public static Matrix3 makeScale(float sx, float sy)
    Parameters
    Type Name Description
    System.Single sx
    System.Single sy
    Returns
    Type Description
    Matrix3

    makeSkew(Single, Single)

    Declaration
    public static Matrix3 makeSkew(float dx, float dy)
    Parameters
    Type Name Description
    System.Single dx
    System.Single dy
    Returns
    Type Description
    Matrix3

    makeTrans(Single, Single)

    Declaration
    public static Matrix3 makeTrans(float dx, float dy)
    Parameters
    Type Name Description
    System.Single dx
    System.Single dy
    Returns
    Type Description
    Matrix3

    makeTrans(Offset)

    Declaration
    public static Matrix3 makeTrans(Offset offset)
    Parameters
    Type Name Description
    Offset offset
    Returns
    Type Description
    Matrix3

    mapPoint(Offset)

    Declaration
    public Offset mapPoint(Offset point)
    Parameters
    Type Name Description
    Offset point
    Returns
    Type Description
    Offset

    mapPoints(Offset[])

    Declaration
    public void mapPoints(Offset[] pts)
    Parameters
    Type Name Description
    Offset[] pts

    mapPoints(Offset[], Offset[])

    Declaration
    public void mapPoints(Offset[] dst, Offset[] src)
    Parameters
    Type Name Description
    Offset[] dst
    Offset[] src

    mapRect(Rect)

    Declaration
    public Rect mapRect(Rect src)
    Parameters
    Type Name Description
    Rect src
    Returns
    Type Description
    Rect

    mapRect(ref Rect)

    Declaration
    public bool mapRect(ref Rect rect)
    Parameters
    Type Name Description
    Rect rect
    Returns
    Type Description
    System.Boolean

    mapRect(out Rect, Rect)

    Declaration
    public bool mapRect(out Rect dst, Rect src)
    Parameters
    Type Name Description
    Rect dst
    Rect src
    Returns
    Type Description
    System.Boolean

    mapRectScaleTranslate(out Rect, Rect)

    Declaration
    public void mapRectScaleTranslate(out Rect dst, Rect src)
    Parameters
    Type Name Description
    Rect dst
    Rect src

    mapRectToQuad(Rect)

    Declaration
    public Offset[] mapRectToQuad(Rect rect)
    Parameters
    Type Name Description
    Rect rect
    Returns
    Type Description
    Offset[]

    mapXY(Single, Single)

    Declaration
    public Offset mapXY(float x, float y)
    Parameters
    Type Name Description
    System.Single x
    System.Single y
    Returns
    Type Description
    Offset

    mapXY(Single, Single, out Single, out Single)

    Declaration
    public void mapXY(float x, float y, out float x1, out float y1)
    Parameters
    Type Name Description
    System.Single x
    System.Single y
    System.Single x1
    System.Single y1

    postConcat(Matrix3)

    Declaration
    public void postConcat(Matrix3 mat)
    Parameters
    Type Name Description
    Matrix3 mat

    postRotate(Single)

    Declaration
    public void postRotate(float radians)
    Parameters
    Type Name Description
    System.Single radians

    postRotate(Single, Single, Single)

    Declaration
    public void postRotate(float radians, float px, float py)
    Parameters
    Type Name Description
    System.Single radians
    System.Single px
    System.Single py

    postScale(Single, Single)

    Declaration
    public void postScale(float sx, float sy)
    Parameters
    Type Name Description
    System.Single sx
    System.Single sy

    postScale(Single, Single, Single, Single)

    Declaration
    public void postScale(float sx, float sy, float px, float py)
    Parameters
    Type Name Description
    System.Single sx
    System.Single sy
    System.Single px
    System.Single py

    postSkew(Single, Single)

    Declaration
    public void postSkew(float kx, float ky)
    Parameters
    Type Name Description
    System.Single kx
    System.Single ky

    postSkew(Single, Single, Single, Single)

    Declaration
    public void postSkew(float kx, float ky, float px, float py)
    Parameters
    Type Name Description
    System.Single kx
    System.Single ky
    System.Single px
    System.Single py

    postTranslate(Single, Single)

    Declaration
    public void postTranslate(float dx, float dy)
    Parameters
    Type Name Description
    System.Single dx
    System.Single dy

    preConcat(Matrix3)

    Declaration
    public void preConcat(Matrix3 other)
    Parameters
    Type Name Description
    Matrix3 other

    preRotate(Single)

    Declaration
    public void preRotate(float radians)
    Parameters
    Type Name Description
    System.Single radians

    preRotate(Single, Single, Single)

    Declaration
    public void preRotate(float radians, float px, float py)
    Parameters
    Type Name Description
    System.Single radians
    System.Single px
    System.Single py

    preScale(Single, Single)

    Declaration
    public void preScale(float sx, float sy)
    Parameters
    Type Name Description
    System.Single sx
    System.Single sy

    preScale(Single, Single, Single, Single)

    Declaration
    public void preScale(float sx, float sy, float px, float py)
    Parameters
    Type Name Description
    System.Single sx
    System.Single sy
    System.Single px
    System.Single py

    preservesAxisAlignment()

    Declaration
    public bool preservesAxisAlignment()
    Returns
    Type Description
    System.Boolean

    preservesRightAngles(Single)

    Declaration
    public bool preservesRightAngles(float tol = 0.000244140625F)
    Parameters
    Type Name Description
    System.Single tol
    Returns
    Type Description
    System.Boolean

    preSkew(Single, Single)

    Declaration
    public void preSkew(float kx, float ky)
    Parameters
    Type Name Description
    System.Single kx
    System.Single ky

    preSkew(Single, Single, Single, Single)

    Declaration
    public void preSkew(float kx, float ky, float px, float py)
    Parameters
    Type Name Description
    System.Single kx
    System.Single ky
    System.Single px
    System.Single py

    preTranslate(Single, Single)

    Declaration
    public void preTranslate(float dx, float dy)
    Parameters
    Type Name Description
    System.Single dx
    System.Single dy

    rectStaysRect()

    Declaration
    public bool rectStaysRect()
    Returns
    Type Description
    System.Boolean

    reset()

    Declaration
    public void reset()

    set9(Single[])

    Declaration
    public void set9(float[] buffer)
    Parameters
    Type Name Description
    System.Single[] buffer

    setAll(Single, Single, Single, Single, Single, Single, Single, Single, Single)

    Declaration
    public void setAll(float scaleX, float skewX, float transX, float skewY, float scaleY, float transY, float persp0, float persp1, float persp2)
    Parameters
    Type Name Description
    System.Single scaleX
    System.Single skewX
    System.Single transX
    System.Single skewY
    System.Single scaleY
    System.Single transY
    System.Single persp0
    System.Single persp1
    System.Single persp2

    setConcat(Matrix3, Matrix3)

    Declaration
    public void setConcat(Matrix3 a, Matrix3 b)
    Parameters
    Type Name Description
    Matrix3 a
    Matrix3 b

    setIdentity()

    Declaration
    public void setIdentity()

    setPerspX(Single)

    Declaration
    public void setPerspX(float v)
    Parameters
    Type Name Description
    System.Single v

    setPerspY(Single)

    Declaration
    public void setPerspY(float v)
    Parameters
    Type Name Description
    System.Single v

    setRotate(Single)

    Declaration
    public void setRotate(float radians)
    Parameters
    Type Name Description
    System.Single radians

    setRotate(Single, Single, Single)

    Declaration
    public void setRotate(float radians, float px, float py)
    Parameters
    Type Name Description
    System.Single radians
    System.Single px
    System.Single py

    setScale(Single, Single)

    Declaration
    public void setScale(float sx, float sy)
    Parameters
    Type Name Description
    System.Single sx
    System.Single sy

    setScale(Single, Single, Single, Single)

    Declaration
    public void setScale(float sx, float sy, float px, float py)
    Parameters
    Type Name Description
    System.Single sx
    System.Single sy
    System.Single px
    System.Single py

    setScaleTranslate(Single, Single, Single, Single)

    Declaration
    public void setScaleTranslate(float sx, float sy, float tx, float ty)
    Parameters
    Type Name Description
    System.Single sx
    System.Single sy
    System.Single tx
    System.Single ty

    setScaleX(Single)

    Declaration
    public void setScaleX(float v)
    Parameters
    Type Name Description
    System.Single v

    setScaleY(Single)

    Declaration
    public void setScaleY(float v)
    Parameters
    Type Name Description
    System.Single v

    setSinCos(Single, Single)

    Declaration
    public void setSinCos(float sinV, float cosV)
    Parameters
    Type Name Description
    System.Single sinV
    System.Single cosV

    setSinCos(Single, Single, Single, Single)

    Declaration
    public void setSinCos(float sinV, float cosV, float px, float py)
    Parameters
    Type Name Description
    System.Single sinV
    System.Single cosV
    System.Single px
    System.Single py

    setSkew(Single, Single)

    Declaration
    public void setSkew(float kx, float ky)
    Parameters
    Type Name Description
    System.Single kx
    System.Single ky

    setSkew(Single, Single, Single, Single)

    Declaration
    public void setSkew(float kx, float ky, float px, float py)
    Parameters
    Type Name Description
    System.Single kx
    System.Single ky
    System.Single px
    System.Single py

    setSkewX(Single)

    Declaration
    public void setSkewX(float v)
    Parameters
    Type Name Description
    System.Single v

    setSkewY(Single)

    Declaration
    public void setSkewY(float v)
    Parameters
    Type Name Description
    System.Single v

    setTranslate(Single, Single)

    Declaration
    public void setTranslate(float dx, float dy)
    Parameters
    Type Name Description
    System.Single dx
    System.Single dy

    setTranslateX(Single)

    Declaration
    public void setTranslateX(float v)
    Parameters
    Type Name Description
    System.Single v

    setTranslateY(Single)

    Declaration
    public void setTranslateY(float v)
    Parameters
    Type Name Description
    System.Single v

    ToString()

    Declaration
    public override string ToString()
    Returns
    Type Description
    System.String
    Overrides
    System.Object.ToString()

    Operators

    Equality(Matrix3, Matrix3)

    Declaration
    public static bool operator ==(Matrix3 a, Matrix3 b)
    Parameters
    Type Name Description
    Matrix3 a
    Matrix3 b
    Returns
    Type Description
    System.Boolean

    Inequality(Matrix3, Matrix3)

    Declaration
    public static bool operator !=(Matrix3 a, Matrix3 b)
    Parameters
    Type Name Description
    Matrix3 a
    Matrix3 b
    Returns
    Type Description
    System.Boolean

    Extension Methods

    MatrixUtils.getAsTranslation(Matrix3)
    MatrixUtils.toMatrix4x4(Matrix3)
    Back to top
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023